## 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. See Profiling Data 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.