gprof: Output Options

1 
1 4.1 Output Options
1 ==================
1 
1 These options specify which of several output formats 'gprof' should
1 produce.
1 
1    Many of these options take an optional "symspec" to specify functions
1 to be included or excluded.  These options can be specified multiple
1 times, with different symspecs, to include or exclude sets of symbols.
1 ⇒Symspecs Symspecs.
1 
1    Specifying any of these options overrides the default ('-p -q'),
1 which prints a flat profile and call graph analysis for all functions.
1 
1 '-A[SYMSPEC]'
1 '--annotated-source[=SYMSPEC]'
1      The '-A' option causes 'gprof' to print annotated source code.  If
1      SYMSPEC is specified, print output only for matching symbols.
1      ⇒The Annotated Source Listing Annotated Source.
1 
1 '-b'
1 '--brief'
1      If the '-b' option is given, 'gprof' doesn't print the verbose
1      blurbs that try to explain the meaning of all of the fields in the
1      tables.  This is useful if you intend to print out the output, or
1      are tired of seeing the blurbs.
1 
1 '-C[SYMSPEC]'
1 '--exec-counts[=SYMSPEC]'
1      The '-C' option causes 'gprof' to print a tally of functions and
1      the number of times each was called.  If SYMSPEC is specified,
1      print tally only for matching symbols.
1 
1      If the profile data file contains basic-block count records,
1      specifying the '-l' option, along with '-C', will cause basic-block
1      execution counts to be tallied and displayed.
1 
1 '-i'
1 '--file-info'
1      The '-i' option causes 'gprof' to display summary information about
1      the profile data file(s) and then exit.  The number of histogram,
1      call graph, and basic-block count records is displayed.
1 
1 '-I DIRS'
1 '--directory-path=DIRS'
1      The '-I' option specifies a list of search directories in which to
1      find source files.  Environment variable GPROF_PATH can also be
1      used to convey this information.  Used mostly for annotated source
1      output.
1 
1 '-J[SYMSPEC]'
1 '--no-annotated-source[=SYMSPEC]'
1      The '-J' option causes 'gprof' not to print annotated source code.
1      If SYMSPEC is specified, 'gprof' prints annotated source, but
1      excludes matching symbols.
1 
1 '-L'
1 '--print-path'
1      Normally, source filenames are printed with the path component
1      suppressed.  The '-L' option causes 'gprof' to print the full
1      pathname of source filenames, which is determined from symbolic
1      debugging information in the image file and is relative to the
1      directory in which the compiler was invoked.
1 
1 '-p[SYMSPEC]'
1 '--flat-profile[=SYMSPEC]'
1      The '-p' option causes 'gprof' to print a flat profile.  If SYMSPEC
11      is specified, print flat profile only for matching symbols.  ⇒
      The Flat Profile Flat Profile.
1 
1 '-P[SYMSPEC]'
1 '--no-flat-profile[=SYMSPEC]'
1      The '-P' option causes 'gprof' to suppress printing a flat profile.
1      If SYMSPEC is specified, 'gprof' prints a flat profile, but
1      excludes matching symbols.
1 
1 '-q[SYMSPEC]'
1 '--graph[=SYMSPEC]'
1      The '-q' option causes 'gprof' to print the call graph analysis.
1      If SYMSPEC is specified, print call graph only for matching symbols
1      and their children.  ⇒The Call Graph Call Graph.
1 
1 '-Q[SYMSPEC]'
1 '--no-graph[=SYMSPEC]'
1      The '-Q' option causes 'gprof' to suppress printing the call graph.
1      If SYMSPEC is specified, 'gprof' prints a call graph, but excludes
1      matching symbols.
1 
1 '-t'
1 '--table-length=NUM'
1      The '-t' option causes the NUM most active source lines in each
1      source file to be listed when source annotation is enabled.  The
1      default is 10.
1 
1 '-y'
1 '--separate-files'
1      This option affects annotated source output only.  Normally,
1      'gprof' prints annotated source files to standard-output.  If this
1      option is specified, annotated source for a file named
1      'path/FILENAME' is generated in the file 'FILENAME-ann'.  If the
1      underlying file system would truncate 'FILENAME-ann' so that it
1      overwrites the original 'FILENAME', 'gprof' generates annotated
1      source in the file 'FILENAME.ann' instead (if the original file
1      name has an extension, that extension is _replaced_ with '.ann').
1 
1 '-Z[SYMSPEC]'
1 '--no-exec-counts[=SYMSPEC]'
1      The '-Z' option causes 'gprof' not to print a tally of functions
1      and the number of times each was called.  If SYMSPEC is specified,
1      print tally, but exclude matching symbols.
1 
1 '-r'
1 '--function-ordering'
1      The '--function-ordering' option causes 'gprof' to print a
1      suggested function ordering for the program based on profiling
1      data.  This option suggests an ordering which may improve paging,
1      tlb and cache behavior for the program on systems which support
1      arbitrary ordering of functions in an executable.
1 
1      The exact details of how to force the linker to place functions in
1      a particular order is system dependent and out of the scope of this
1      manual.
1 
1 '-R MAP_FILE'
1 '--file-ordering MAP_FILE'
1      The '--file-ordering' option causes 'gprof' to print a suggested .o
1      link line ordering for the program based on profiling data.  This
1      option suggests an ordering which may improve paging, tlb and cache
1      behavior for the program on systems which do not support arbitrary
1      ordering of functions in an executable.
1 
1      Use of the '-a' argument is highly recommended with this option.
1 
1      The MAP_FILE argument is a pathname to a file which provides
1      function name to object file mappings.  The format of the file is
1      similar to the output of the program 'nm'.
1 
1           c-parse.o:00000000 T yyparse
1           c-parse.o:00000004 C yyerrflag
1           c-lang.o:00000000 T maybe_objc_method_name
1           c-lang.o:00000000 T print_lang_statistics
1           c-lang.o:00000000 T recognize_objc_keyword
1           c-decl.o:00000000 T print_lang_identifier
1           c-decl.o:00000000 T print_lang_type
1           ...
1 
1 
1      To create a MAP_FILE with GNU 'nm', type a command like 'nm
1      --extern-only --defined-only -v --print-file-name program-name'.
1 
1 '-T'
1 '--traditional'
1      The '-T' option causes 'gprof' to print its output in "traditional"
1      BSD style.
1 
1 '-w WIDTH'
1 '--width=WIDTH'
1      Sets width of output lines to WIDTH.  Currently only used when
1      printing the function index at the bottom of the call graph.
1 
1 '-x'
1 '--all-lines'
1      This option affects annotated source output only.  By default, only
1      the lines at the beginning of a basic-block are annotated.  If this
1      option is specified, every line in a basic-block is annotated by
1      repeating the annotation for the first line.  This behavior is
1      similar to 'tcov''s '-a'.
1 
1 '--demangle[=STYLE]'
1 '--no-demangle'
1      These options control whether C++ symbol names should be demangled
1      when printing output.  The default is to demangle symbols.  The
1      '--no-demangle' option may be used to turn off demangling.
1      Different compilers have different mangling styles.  The optional
1      demangling style argument can be used to choose an appropriate
1      demangling style for your compiler.
1