Skip to Content
Linux in a Nutshell, 6th Edition
book

Linux in a Nutshell, 6th Edition

by Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
September 2009
Beginner
942 pages
85h 34m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, 6th Edition

Name

gprof

Synopsis

gprof [options] [object_file]

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). Many of gprof’s options take a symbol-specification argument, or symspec, to limit the option to specified files or functions. The symspec may be a filename, a function, or a line number. It can also be given as filename:function or filename:linenumber to specify a function or line number in a specific file. gprof expects filenames to contain a period and functions to not contain a period.

Options

-a, --no-static

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, --brief

Do not display information about each field in the profile.

-c, --static-call-graph

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.

--demangle[=style], --no-demangle

Specify whether C++ symbols should be demangled or not. They are demangled by default. If profiling a program built by a different compiler, you may need to specify the mangling style.

--function-ordering

Print suggested function order based on profiling data.

--file-ordering file

Print suggested link line order for .o files based on profiling data. Read function name to object file mappings from file. This file can be ...

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

Unix in a Nutshell, 4th Edition

Unix in a Nutshell, 4th Edition

Arnold Robbins
Linux Under the Hood

Linux Under the Hood

Sander van Vugt
Linux Kernel in a Nutshell

Linux Kernel in a Nutshell

Greg Kroah-Hartman

Publisher Resources

ISBN: 9780596806088Errata Page