Skip to Main Content
Unix in a Nutshell, 4th Edition
book

Unix in a Nutshell, 4th Edition

by Arnold Robbins
October 2005
Intermediate to advanced content levelIntermediate to advanced
908 pages
46h 42m
English
O'Reilly Media, Inc.
Content preview from Unix in a Nutshell, 4th Edition

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-static

Don’t print statically declared functions.

-b, --brief

Brief; don’t print field descriptions in the profile.

-c, --static-call-graph

Find the program’s static call-graph. Call counts of 0 indicate static-only parents or children.

-e name

Don’t print the graph profile entry for the routine name. -e may be repeated.

-E name

Like -e. In addition, during time computations, omit the time spent in name.

-f name

Print the graph profile entry only for routine name. -f may be repeated.

-F name

Like -f. In addition, during time computations, use only the times of the printed routines. -F may be repeated, and it overrides -E.

-s, --sum

With 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-functions

Show routines that have zero usage. Useful with -c to find out which routines were never called.

Solaris Options

- n

Only print the top n functions.

-C

Demangle C++ symbol names ...

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.
Start your free trial

You might also like

Learning the Unix Operating System, 5th Edition

Learning the Unix Operating System, 5th Edition

John Strang, Grace Todino, Jerry Peek
UNIX and Linux System Administration Handbook, 5th Edition

UNIX and Linux System Administration Handbook, 5th Edition

Trent R. Hein, Evi Nemeth, Garth Snyder, Ben Whaley, Dan Mackin

Publisher Resources

ISBN: 0596100299Errata Page