Diagnostic Messages

The Diagnostic Messages appear at the end of the report.

gprof Fallacy and Possibly Misleading Results

The HP Caliper sampled call graph report (with the scgprof measurement) and the call graph report (with the cgprof measurement) both produce gprof-like reports. Thus, both these reports might produce misleading results regarding the amount of time spent under a function. The inaccuracy results because the HP Caliper sampled call graph and call graph reports estimate the amount of time spent in a function from the number of times the function is called, regardless of the time actually spent in the function. This is sometimes referred to as the gprof fallacy.

For example, if function A and B each call function C 10 times, scgprof and cgprof assign the total time spent in function C equally to both functions A and B. However, calls from function A might take longer than those from function B. In this example, function A would have a higher effect on performance than function B, which the call graph data would not show.

Keep this limitation in mind when you analyze sampled call graph and call graph report results.

gprof Fallacy and Possibly Misleading Results 133