Name
gprof
Synopsis
gprof [options] [objfile[pfile]]
Display call-graph profile data of C programs. Programs compiled with the
-xpg option of Sun’s cc (-pg on other
compilers) produce a call-graph profile file
pfile, whose default name is gmon.out. The specified object file
objfile (a.out by default) contains a symbol
table that is read and correlated with
pfile.
URL: http://www.gnu.org/software/binutils for the GNU version of gprof.
Common Options
-a,--no-staticDon’t print statically declared functions.
-b,--briefBrief; don’t print field descriptions in the profile.
-c,--static-call-graphFind the program’s static call-graph. Call counts of 0 indicate static-only parents or children.
-
-ename Don’t print the graph profile entry for the routine name.
-emay be repeated.-
-Ename Like
-e. In addition, during time computations, omit the time spent in name.-
-fname Print the graph profile entry only for routine name.
-fmay be repeated.-
-Fname Like
-f. In addition, during time computations, use only the times of the printed routines.-Fmay be repeated, and it overrides-E.-s,--sumWith this option, you supply one or more existing pfiles. Sum the information in all specified profile files and send it to a profile file called gmon.sum. Useful for accumulating data across several runs.
-z,--display-unused-functionsShow routines that have zero usage. Useful with
-cto find out which routines were never called.
Solaris Options
-
-n Only print the top n functions.
-
-C Demangle C++ symbol names ...