Linux in a Nutshell, Third Edition
by Ellen Siever, Stephen Spainhour, Jessica P. Hekman, Stephen Figgins
Name
gprof
Synopsis
gprof [options] [object_file]
Description
Display the profile data for an object file. The file’s symbol table is compared with the call graph profile file gmon.out (previously created by compiling with gcc -pg).
Options
- -a
Do not display statically declared functions. Since their information might still be relevant, append it to the information about the functions loaded immediately before.
- -b
Do not display information about each field in the profile.
- -c
Consult the object file’s text area to attempt to determine the program’s static call graph. Display static-only parents and children with call counts of 0.
- -e routine
Do not display entries for routine and its descendants.
- -f routine
Print only routine, but include time spent in all routines.
- -k from to
Remove arcs between the routines from and to.
- -s
Summarize profile information in the file gmon.sum.
- -v
Print version and exit.
- -z
Include zero-usage calls.
- -E routine
Do not display entries for routine and its descendants or include time spent on them in calculations for total time.
- -F routine
Print only information about routine. Do not include time spent in other routines.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access