Lines Matching refs:gprof
2 @setfilename gprof.info
4 @settitle GNU gprof
16 * gprof: (gprof). Profiling your program's execution
21 This file documents the gprof profiler of the GNU system.
40 @title GNU gprof
50 This manual describes the @sc{gnu} profiler, @code{gprof}, and how you
53 execute programs. @sc{gnu} @code{gprof} was written by Jay Fenlason.
73 This manual describes the @sc{gnu} profiler, @code{gprof}, and how you
76 execute programs. @sc{gnu} @code{gprof} was written by Jay Fenlason.
78 This manual is for @code{gprof}
93 * Invoking:: How to run @code{gprof}, and its options
95 * Output:: Interpreting @code{gprof}'s output
99 * Incompatibilities:: (between @sc{gnu} @code{gprof} and Unix @code{gprof}.)
109 @c man title gprof display call graph profile data
113 gprof [ -[abcDhilLrsTvwxyz] ] [ -[ACeEfFJnNOpPqQZ][@var{name}] ]
135 @code{gprof} produces an execution profile of C, Pascal, or Fortran77
145 If more than one profile file is specified, the @code{gprof}
192 monitor(3), profil(2), cc(1), prof(1), and the Info entry for @file{gprof}.
199 ``gprof: A Call Graph Execution Profiler'',
233 You must run @code{gprof} to analyze the profile data.
234 @xref{Invoking, ,@code{gprof} Command Summary}.
292 will be gathered and when you run @code{gprof} you will get an error
296 gprof: gmon.out file is missing call-graph data
351 @code{gcov} tool instead of @code{gprof}. See that tool's manual or
355 information that works with @code{gprof} rather than @code{gcov} so
357 @code{gprof}. @xref{Line-by-line, ,Line-by-line Profiling}.
369 generate the information that @code{gprof} needs. Simply run the program
404 The Perl script @code{bbconv.pl}, included with the @code{gprof}
406 a format readable by @code{gprof}. Invoke it like this:
413 @code{gprof} can understand. But you still need to tell @code{gprof}
415 @var{bb-data} on the @code{gprof} command line, @emph{along with
419 gprof @var{options} @var{executable-file} gmon.out @var{bb-data} [@var{yet-more-profile-data-files}…
423 @chapter @code{gprof} Command Summary
425 After you have a profile data file @file{gmon.out}, you can run @code{gprof}
426 to interpret the information in it. The @code{gprof} program prints a
428 redirect the output of @code{gprof} into a file with @samp{>}.
430 You run @code{gprof} like this:
433 gprof @var{options} [@var{executable-file} [@var{profile-data-files}@dots{}]] [> @var{outfile}]
451 * Output Options:: Controlling @code{gprof}'s output style
452 * Analysis Options:: Controlling how @code{gprof} analyzes its data
464 @code{gprof} should produce.
479 The @samp{-A} option causes @code{gprof} to print annotated source code.
485 If the @samp{-b} option is given, @code{gprof} doesn't print the
492 The @samp{-C} option causes @code{gprof} to
502 The @samp{-i} option causes @code{gprof} to display summary information
515 The @samp{-J} option causes @code{gprof} not to
517 If @var{symspec} is specified, @code{gprof} prints annotated source,
523 component suppressed. The @samp{-L} option causes @code{gprof}
532 The @samp{-p} option causes @code{gprof} to print a flat profile.
538 The @samp{-P} option causes @code{gprof} to suppress printing a flat profile.
539 If @var{symspec} is specified, @code{gprof} prints a flat profile,
544 The @samp{-q} option causes @code{gprof} to print the call graph analysis.
551 The @samp{-Q} option causes @code{gprof} to suppress printing the
553 If @var{symspec} is specified, @code{gprof} prints a call graph,
565 Normally, @code{gprof} prints annotated source files
570 overwrites the original @file{@var{filename}}, @code{gprof} generates
577 The @samp{-Z} option causes @code{gprof} not to
583 The @samp{--function-ordering} option causes @code{gprof} to print a
595 The @samp{--file-ordering} option causes @code{gprof} to print a
626 The @samp{-T} option causes @code{gprof} to print its output in
660 The @samp{-a} option causes @code{gprof} to suppress the printing of
666 @c This is compatible with Unix @code{gprof}, but a bad idea.
686 The @samp{-D} option causes @code{gprof} to ignore symbols which
708 the running time of @code{gprof}, and magnifies statistical
713 This option causes @code{gprof} to print the source file after each
724 The @samp{-n} option causes @code{gprof}, in its call graph analysis,
729 The @samp{-n} option causes @code{gprof}, in its call graph analysis,
734 The @samp{-S} option causes @code{gprof} to read an external symbol table
741 If you give the @samp{-z} option, @code{gprof} will mention all
757 @xref{Debugging, ,Debugging @code{gprof}}.
771 The @samp{-s} option causes @code{gprof} to summarize the information
774 the profile data files that @code{gprof} read in. The file @file{gmon.sum}
778 Eventually you can run @code{gprof} again without @samp{-s} to analyze the
783 The @samp{-v} flag causes @code{gprof} to print the current version
796 The @samp{-e @var{function}} option tells @code{gprof} to not print
812 The @samp{-f @var{function}} option causes @code{gprof} to limit the
835 gprof -e boring -f foo -f bar myprogram > gprof.output
861 dot in the string tells @code{gprof} to interpret
881 @code{gprof} will normally not print these underscores. When you name a
882 symbol in a symspec, you should type it exactly as @code{gprof} prints
884 @samp{_main} from your @code{main} function, @code{gprof} still prints
896 @chapter Interpreting @code{gprof}'s Output
898 @code{gprof} can produce several different output styles, the
911 * Line-by-line:: @code{gprof} can analyze individual source code lines
1043 same @code{gprof} run as the flat profile example in the previous
1220 options to @code{gprof} request the omission of certain functions.
1299 @code{gprof} cannot determine this, so @code{a} and @code{b} are still
1313 The way @code{gprof} resolves this paradox is by creating a single entry
1422 @code{gprof}'s @samp{-l} option causes the program to perform
1439 the current version of @code{gprof} does not propagate
1444 Here is a section of @code{gprof}'s output, without line-by-line profiling.
1472 Now let's look at some of @code{gprof}'s output from the same program run,
1520 @code{gprof}'s @samp{-A} option triggers an annotated source listing,
1523 @samp{-I} option, if @code{gprof} can't find the source code files.
1527 addition to function counting code. This enables @code{gprof} to
1567 @samp{gprof -l -A}.
1603 @chapter Inaccuracy of @code{gprof} Output
1613 The run-time figures that @code{gprof} gives you are based on a sampling
1655 several runs, using the @samp{-s} option of @code{gprof}. Here is how:
1671 gprof -s @var{executable-file} gmon.out gmon.sum
1681 gprof @var{executable-file} gmon.sum > @var{output-file}
1693 data itself. Instead, @code{gprof} estimates them by making an assumption
1707 But @code{gprof} has no way of knowing this; it will blindly and
1723 Because @code{gprof} can only report call times and counts by function,
1737 Use @samp{gprof -l} and lookup the function in the call graph.
1750 gprof -s fastprog gmon.out.*
1752 gprof fastprog gmon.sum
1762 @chapter Incompatibilities with Unix @code{gprof}
1764 @sc{gnu} @code{gprof} and Berkeley Unix @code{gprof} use the same data
1770 @sc{gnu} @code{gprof} uses a new, generalized file format with support
1772 cookie and version number allows @code{gprof} to easily identify
1777 For a recursive function, Unix @code{gprof} lists the function as a
1779 of recursive calls. @sc{gnu} @code{gprof} omits these lines and puts
1784 @code{gprof} still lists it as a subroutine of functions that call it.
1787 @sc{gnu} @code{gprof} accepts the @samp{-k} with its argument
1793 @sc{gnu} @code{gprof} prints all of their counts, separated by commas.
1797 The function names printed in @sc{gnu} @code{gprof} output do not include
1804 @code{gprof} prints blurbs after the tables, so that you can see the
1814 * Internals:: @code{gprof}'s internal operation
1815 * Debugging:: Using @code{gprof}'s @samp{-d} option
1919 The output from @code{gprof} gives no indication of parts of your program that
1923 time measurements in @code{gprof} output say nothing about time that your
1926 slowly due to thrashing, but @code{gprof} will say it uses little time. On
1935 @code{gprof} file. Furthermore, it does not provide a version number, thus
1936 rendering changes to the file format almost impossible. @sc{gnu} @code{gprof}
1938 compatibility, @sc{gnu} @code{gprof} continues to support the old BSD-derived
1947 the profile was collected. @sc{gnu} @code{gprof} adapts automatically
1954 reading a file, @sc{gnu} @code{gprof} will ensure records of the same type are
2011 @section @code{gprof}'s Internal Operation
2013 Like most programs, @code{gprof} begins by processing its options.
2017 @code{gprof} maintains a single linked list of symspecs,
2027 After option processing, @code{gprof} finishes
2043 @code{gprof}'s own symbol table, an array of Sym structures,
2085 or exclude symspec list, @code{gprof} simply uses its
2186 @section Debugging @code{gprof}
2188 If @code{gprof} was compiled with debugging enabled,