Previous: Internals, Up: Details   [Contents]


9.4 Debugging gprof

If gprof was compiled with debugging enabled, the ‘-d’ option triggers debugging output (to stdout) which can be helpful in understanding its operation. The debugging number specified is interpreted as a sum of the following options:

2 - Topological sort

Monitor depth-first numbering of symbols during call graph analysis

4 - Cycles

Shows symbols as they are identified as cycle heads

16 - Tallying

As the call graph arcs are read, show each arc and how the total calls to each function are tallied

32 - Call graph arc sorting

Details sorting individual parents/children within each call graph entry

64 - Reading histogram and call graph records

Shows address ranges of histograms as they are read, and each call graph arc

128 - Symbol table

Reading, classifying, and sorting the symbol table from the object file. For line-by-line profiling (‘-l’ option), also shows line numbers being assigned to memory addresses.

256 - Static call graph

Trace operation of ‘-c’ option

512 - Symbol table and arc table lookups

Detail operation of lookup routines

1024 - Call graph propagation

Shows how function times are propagated along the call graph

2048 - Basic-blocks

Shows basic-block records as they are read from profile data (only meaningful with ‘-l’ option)

4096 - Symspecs

Shows symspec-to-symbol pattern matching operation

8192 - Annotate source

Tracks operation of ‘-A’ option