8 Incompatibilities with Unix
gprof and Berkeley Unix
gprof use the same data
file gmon.out, and provide essentially the same information. But
there are a few differences.
gprofuses a new, generalized file format with support for basic-block execution counts and non-realtime histograms. A magic cookie and version number allows
gprofto easily identify new style files. Old BSD-style files can still be read. See Profiling Data File Format.
- For a recursive function, Unix
gproflists the function as a parent and as a child, with a
callsfield that lists the number of recursive calls. gnu
gprofomits these lines and puts the number of recursive calls in the primary line.
- When a function is suppressed from the call graph with -e, gnu
gprofstill lists it as a subroutine of functions that call it.
gprofaccepts the -k with its argument in the form from/to, instead of from to.
- In the annotated source listing,
if there are multiple basic blocks on the same line,
gprofprints all of their counts, separated by commas.
- The blurbs, field widths, and output formats are different. gnu
gprofprints blurbs after the tables, so that you can see the tables without skipping the blurbs.