gprof: Incompatibilities
8 Incompatibilities with Unix 'gprof'
*************************************
GNU 'gprof' and Berkeley Unix 'gprof' use the same data file 'gmon.out',
and provide essentially the same information. But there are a few
differences.
* GNU 'gprof' uses a new, generalized file format with support for
basic-block execution counts and non-realtime histograms. A magic
cookie and version number allows 'gprof' to easily identify new
style files. Old BSD-style files can still be read.
Profiling Data File Format File Format.
* For a recursive function, Unix 'gprof' lists the function as a
parent and as a child, with a 'calls' field that lists the number
of recursive calls. GNU 'gprof' omits 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
'gprof' still lists it as a subroutine of functions that call it.
* GNU 'gprof' accepts 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, GNU 'gprof' prints all of their counts, separated
by commas.
* The blurbs, field widths, and output formats are different. GNU
'gprof' prints blurbs after the tables, so that you can see the
tables without skipping the blurbs.