* config/tc-sparc.c: Reorganize file.
[deliverable/binutils-gdb.git] / gprof / gprof.texi
index 81d5f0f70cf2742db23f906e12e05182c744d00f..0114307d0ebb0507bda6b4ce0a2f684892cfdf83 100644 (file)
@@ -2,6 +2,17 @@
 @setfilename gprof.info
 @settitle GNU gprof
 @setchapternewpage odd
+
+@ifinfo
+@c This is a dir.info fragment to support semi-automated addition of
+@c manuals to an info tree.  zoo@cygnus.com is developing this facility.
+@format
+START-INFO-DIR-ENTRY
+* gprof: (gprof).                Profiling your program's execution
+END-INFO-DIR-ENTRY
+@end format
+@end ifinfo
+
 @ifinfo
 This file documents the gprof profiler of the GNU system.
 
@@ -77,6 +88,8 @@ can use it to determine which parts of a program are taking most of the
 execution time.  We assume that you know how to write, compile, and
 execute programs.  @sc{gnu} @code{gprof} was written by Jay Fenlason.
 
+This manual was updated January 1993.
+
 @menu
 * Why::                 What profiling means, and why it is useful.
 * Compiling::           How to compile your program for profiling.
@@ -281,6 +294,12 @@ function that was loaded directly before it in the executable file.
 @c This is compatible with Unix @code{gprof}, but a bad idea.  
 This option affects both the flat profile and the call graph.
 
+@item -D
+The @samp{-D} option causes @code{gprof} to ignore symbols which
+are not known to be functions.  This option will give more accurate
+profile data on systems where it is supported (Solaris and HPUX for
+example).
+
 @item -e @var{function_name}
 The @samp{-e @var{function}} option tells @code{gprof} to not print
 information about the function @var{function_name} (and its
@@ -316,6 +335,10 @@ may be given; only one @var{function_name} may be indicated with each
 The @samp{-k} option allows you to delete from the profile any arcs from
 routine @var{from} to routine @var{to}.
 
+@item -v
+The @samp{-v} flag causes @code{gprof} to print the current version
+number, and then exit.
+
 @item -z
 If you give the @samp{-z} option, @code{gprof} will mention all
 functions in the flat profile, even those that were never called, and
@@ -371,6 +394,46 @@ cumulative data in the file @file{gmon.sum}.
 @item -T
 The @samp{-T} option causes @code{gprof} to print its output in
 ``traditional'' BSD style.
+
+@item --function-ordering
+The @samp{--function-ordering} option causes @code{gprof} to print a
+suggested function ordering for the program based on profiling data.
+This option suggests an ordering which may improve paging, tlb and
+cache behavior for the program on systems which support arbitrary
+ordering of functions in an executable.
+
+The exact details of how to force the linker to place functions
+in a particular order is system dependent and out of the scope of this
+manual.
+
+@item --file-ordering @var{map_file}
+The @samp{--file-ordering} option causes @code{gprof} to print a
+suggested .o link line ordering for the program based on profiling data.
+This option suggests an ordering which may improve paging, tlb and
+cache behavior for the program on systems which do not support arbitrary
+ordering of functions in an executable.
+
+Use of the @samp{-a} argument is highly recommended with this option.
+
+The @var{map_file} argument is a pathname to a file which provides
+function name to object file mappings.  The format of the file is similar to
+the output of the program @code{nm}.
+
+@smallexample
+@group
+c-parse.o:00000000 T yyparse
+c-parse.o:00000004 C yyerrflag
+c-lang.o:00000000 T maybe_objc_method_name
+c-lang.o:00000000 T print_lang_statistics
+c-lang.o:00000000 T recognize_objc_keyword
+c-decl.o:00000000 T print_lang_identifier
+c-decl.o:00000000 T print_lang_type
+@dots{}
+
+@end group
+@end smallexample
+
+GNU @code{nm} @samp{--extern-only} @samp{--defined-only} @samp{-v} @samp{--print-file-name} can be used to create @var{map_file}.
 @end table
 
 @node Flat Profile
@@ -1002,6 +1065,7 @@ C identifiers on many operating systems.
 The blurbs, field widths, and output formats are different.  @sc{gnu}
 @code{gprof} prints blurbs after the tables, so that you can see the
 tables without skipping the blurbs.
+@end itemize
 
 @contents
 @bye
This page took 0.024666 seconds and 4 git commands to generate.