LinuxDevCenter.com
oreilly.comSafari Books Online.Conferences.

advertisement


Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.



gprof

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 created using the nm command.

-i, --file-info

Print summary information on datafiles, then exit.

-k from to

Remove arcs between the routines from and to.

-m n, --min-count[=n]

Don't print count statistics for symbols executed less than n times.

-n[symspec] , --time[=symspec]

Propogate time statistics in call graph analysis.

-p[symspec] , --flat-profile[=symspec]

Print profile statistics.

-q[symspec] , --graph[=symspec]

Print call graph analysis.

-s, --sum

Summarize profile information in the file gmon.sum.

-v, --version

Print version and exit.

-w n, --width=n

Print function index formatted to width n.

-x, --all-lines

When printing annotated source, annotate every line in a basic block, not just the beginning.

-y, --separate-files

Print annotated-source output to separate files instead of standard output. The annotated source for each source file is printed to filename-ann.

-z, --display-unused-functions

Include zero-usage calls.

-A[symspec] , --annotated-source[=symspec]

Print annotated source code.

-C[symspec] , --exec-counts[=symspec]

Print statistics on the number of times each function is called. When used with option -l, count basic-block execution.

-F routine

Print only information about routine. Do not include time spent in other routines.

-I dirs, --directory-path=dirs

Set directory path to search for source files. The dirs argument may be given as a colon-separated list of directories.

-J[symspec] , --no-annotated-source[=symspec]

Don't print annotated source code.

-L, --print-path

Print the path information when printing filenames.

-N[symspec] , --no-time[=symspec]

Don't propogate time statistics in call graph analysis.

-P[symspec] , --no-flat-profile[=symspec]

Don't print profile statistics

-Q[symspec] , --no-graph[=symspec]

Don't print call graph analysis.

-T, --traditional

Print output in BSD style.

-Z[symspec] , --no-exec-counts[=symspec]

Don't print statistics on the number of times each function is called.


Linux Resources
  • Linux Online
  • The Linux FAQ
  • linux.java.net
  • Linux Kernel Archives
  • Kernel Traffic
  • DistroWatch.com


  • Sponsored by: