function [footNotes, supplementaryText, noteHtml] = profGetDataForSectionColumn...
(section, footNotes, withCodeSymbol, lReportFcn)
%PROFGETDATAFORSECTIONCOLUMN generates data for section column in profiling report

% Copyright 2010-2016 The MathWorks, Inc.

traceInfo = section.getTraceInfo;

if nargin<2
withCodeSymbol = false;
end

isTask = traceInfo.isTask;
supplementaryText= '';
noteHtml = '';

if ~isTask
modelText = coder.profile.htmlEscape(getName(traceInfo));
lResolvesToPrimaryCallSite = getResolvesToPrimaryCallSite(traceInfo);
if ~lResolvesToPrimaryCallSite
% Multiple graphical call sites cannot each be resolved to separate nodes in the
% dynamic call tree: add a foot note about reusable code.
footNoteKey = 'CodeReuseFootnote';
if ~footNotes.isKey(footNoteKey)
footNoteText = DAStudio.message('CoderProfile:ExecutionTime:ExecProfReportReuseNote');
footNoteNum = footNotes.length+1;
footNoteRef = coder.profile.private.createProbeIdentifier ...
(footNoteKey, 32);
footNote = struct('Number',footNoteNum, ...
'Text', footNoteText,...
'Ref', footNoteRef);
footNotes(footNoteKey) = footNote;
else
footNote = footNotes(footNoteKey);
footNoteNum = footNote.Number;
footNoteRef = footNote.Ref;
end

noteHtml = sprintf...
('&#91;<a href="#%s" title="Reusable code">Note %d</a>&#93;',....
footNoteRef, footNoteNum);
end
else
[modelText, ~] = feval(...
sprintf('%s.getTaskTextandEntity', lReportFcn), traceInfo, []);
end
if withCodeSymbol && ~isempty(traceInfo)
% Supplementary text to disambiguate case where one model entity maps to more
% than one function
supplementaryText = traceInfo.getCodeSectionName;
if regexp(modelText, sprintf('^%s($)|( )', supplementaryText))
supplementaryText = ''; % No supplementary text if just repeating name of model
% entity
end
end