Home | History | Annotate | Line # | Download | only in doc
      1  1.1  christos @c ----------------------------------------------------------------------------
      2  1.1  christos @c This is the Texinfo source file for the gprofng-display-text man page.
      3  1.1  christos @c
      4  1.1  christos @c Author: Ruud van der Pas
      5  1.1  christos @c ----------------------------------------------------------------------------
      6  1.1  christos @ifset man
      7  1.1  christos \input texinfo @c -*-texinfo-*-
      8  1.1  christos @setfilename gprofng-display-text
      9  1.1  christos @settitle Display the performance data in plain text format
     10  1.1  christos @include gp-macros.texi
     11  1.1  christos @end ifset
     12  1.1  christos 
     13  1.1  christos @c ----------------------------------------------------------------------------
     14  1.1  christos @c This is from the man-pages(7) man page
     15  1.1  christos @c
     16  1.1  christos @c "The list below shows conventional or suggested sections.  Most manual pages
     17  1.1  christos @c  should include at least the highlighted sections.  Arrange a new manual
     18  1.1  christos @c  page so that sections are placed in the order shown in the list."
     19  1.1  christos @c
     20  1.1  christos @c              NAME
     21  1.1  christos @c              SYNOPSIS
     22  1.1  christos @c              CONFIGURATION    [Normally only in Section 4]
     23  1.1  christos @c              DESCRIPTION
     24  1.1  christos @c              OPTIONS          [Normally only in Sections 1, 8]
     25  1.1  christos @c              EXIT STATUS      [Normally only in Sections 1, 8]
     26  1.1  christos @c              RETURN VALUE     [Normally only in Sections 2, 3]
     27  1.1  christos @c              ERRORS           [Typically only in Sections 2, 3]
     28  1.1  christos @c              ENVIRONMENT
     29  1.1  christos @c              FILES
     30  1.1  christos @c              VERSIONS         [Normally only in Sections 2, 3]
     31  1.1  christos @c              ATTRIBUTES       [Normally only in Sections 2, 3]
     32  1.1  christos @c              CONFORMING TO
     33  1.1  christos @c              NOTES
     34  1.1  christos @c              BUGS
     35  1.1  christos @c              EXAMPLES
     36  1.1  christos @c              AUTHORS          [Discouraged]
     37  1.1  christos @c              REPORTING BUGS   [Not used in man-pages]
     38  1.1  christos @c              COPYRIGHT        [Not used in man-pages]
     39  1.1  christos @c              SEE ALSO
     40  1.1  christos @c
     41  1.1  christos @c This is what the texi2pod.pl tool recognizes:
     42  1.1  christos @c
     43  1.1  christos @c for $sect (qw(NAME SYNOPSIS TARGET DESCRIPTION OPTIONS ENVIRONMENT FILES
     44  1.1  christos @c               BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
     45  1.1  christos @c
     46  1.1  christos @c What is interesting is that it places "SEE ALSO" before "COPYRIGHT", which
     47  1.1  christos @c makes sense and adhered to for the other formats.
     48  1.1  christos @c ----------------------------------------------------------------------------
     49  1.1  christos 
     50  1.1  christos @c ----------------------------------------------------------------------------
     51  1.1  christos @c NAME section
     52  1.1  christos @c ----------------------------------------------------------------------------
     53  1.1  christos 
     54  1.1  christos @ManPageStart{NAME}
     55  1.1  christos @c man begin NAME
     56  1.1  christos 
     57  1.1  christos gprofng-display-text - Display the performance data in plain text format
     58  1.1  christos 
     59  1.1  christos @c man end
     60  1.1  christos @ManPageEnd{}
     61  1.1  christos 
     62  1.1  christos @c ----------------------------------------------------------------------------
     63  1.1  christos @c SYNOPSIS section
     64  1.1  christos @c ----------------------------------------------------------------------------
     65  1.1  christos 
     66  1.1  christos @ManPageStart{SYNOPSIS}
     67  1.1  christos @c man begin SYNOPSIS
     68  1.1  christos 
     69  1.1  christos @command{gprofng display text} [@var{option(s)}] [@var{commands}]
     70  1.1  christos [-script @var{script-file}] @var{experiment(s)}
     71  1.1  christos 
     72  1.1  christos @c man end
     73  1.1  christos @ManPageEnd{}
     74  1.1  christos 
     75  1.1  christos @c ----------------------------------------------------------------------------
     76  1.1  christos @c DESCRIPTION section
     77  1.1  christos @c ----------------------------------------------------------------------------
     78  1.1  christos 
     79  1.1  christos @ManPageStart{DESCRIPTION}
     80  1.1  christos @c man begin DESCRIPTION
     81  1.1  christos 
     82  1.1  christos Print a plain text version of the various displays supported by gprofng.
     83  1.1  christos 
     84  1.1  christos The input consists of one or more experiment directories.  Through commands,
     85  1.1  christos the user controls the output.
     86  1.1  christos 
     87  1.1  christos There is a rich set of commands to control the display of the data.  The
     88  1.1  christos @samp{NOTES} section lists the most common ones.  The gprofng user guide
     89  1.1  christos lists all the commands supported.
     90  1.1  christos 
     91  1.1  christos Commands specified on the command line need to be prepended with the dash ('-')
     92  1.1  christos symbol.
     93  1.1  christos 
     94  1.1  christos In this example, a function overview will be shown, followed by the source
     95  1.1  christos code listing of function @samp{my-func}, annotated with the
     96  1.1  christos performance metrics that have been recorded during the data collection
     97  1.1  christos and stored in experiment directory @samp{my-exp.er}:
     98  1.1  christos 
     99  1.1  christos @smallexample
    100  1.1  christos $ gprofng display text -functions -source my-func my-exp.er
    101  1.1  christos @end smallexample
    102  1.1  christos 
    103  1.1  christos Instead of, or in addition to, specifying these commands on the command line,
    104  1.1  christos commands may also be included in a file called the @var{script-file}.
    105  1.1  christos 
    106  1.1  christos Note that the commands are processed and interpreted from left to right,
    107  1.1  christos @emph{so the order matters}.
    108  1.1  christos 
    109  1.1  christos If this tool is invoked without options, commands, or a script file, it
    110  1.1  christos starts in interpreter mode.  The user can then issue the commands
    111  1.1  christos interactively.  The session is terminated with the @command{exit} command in
    112  1.1  christos the interpreter.
    113  1.1  christos 
    114  1.1  christos @c man end
    115  1.1  christos @ManPageEnd{}
    116  1.1  christos 
    117  1.1  christos @c ----------------------------------------------------------------------------
    118  1.1  christos @c OPTIONS section
    119  1.1  christos @c ----------------------------------------------------------------------------
    120  1.1  christos 
    121  1.1  christos @ManPageStart{OPTIONS}
    122  1.1  christos @c man begin OPTIONS
    123  1.1  christos 
    124  1.1  christos @table @gcctabopt
    125  1.1  christos 
    126  1.1  christos @item --version
    127  1.1  christos @ifclear man
    128  1.1  christos @IndexSubentry{Options, @code{--version}}
    129  1.1  christos @end ifclear
    130  1.1  christos 
    131  1.1  christos Print the version number and exit.
    132  1.1  christos 
    133  1.1  christos @item --help
    134  1.1  christos @ifclear man
    135  1.1  christos @IndexSubentry{Options, @code{--help}}
    136  1.1  christos @end ifclear
    137  1.1  christos 
    138  1.1  christos Print usage information and exit.
    139  1.1  christos 
    140  1.1  christos @item -script @var{script-file}
    141  1.1  christos @ifclear man
    142  1.1  christos @IndexSubentry{Options,  @code{-script}}
    143  1.1  christos @IndexSubentry{Commands, @code{script}}
    144  1.1  christos @end ifclear
    145  1.1  christos 
    146  1.1  christos Execute the commands stored in the script file.  This feature may be combined
    147  1.1  christos with commands specified at the command line.
    148  1.1  christos 
    149  1.1  christos @end table
    150  1.1  christos 
    151  1.1  christos @c man end
    152  1.1  christos @ManPageEnd{}
    153  1.1  christos 
    154  1.1  christos @c ----------------------------------------------------------------------------
    155  1.1  christos @c NOTES section
    156  1.1  christos @c ----------------------------------------------------------------------------
    157  1.1  christos 
    158  1.1  christos @ManPageStart{NOTES}
    159  1.1  christos @c man begin NOTES
    160  1.1  christos 
    161  1.1  christos Many commands are supported.  Below, the more common ones are listed in
    162  1.1  christos mostly alphabetical order, because sometimes it is more logical to
    163  1.1  christos swap the order of two entries.
    164  1.1  christos 
    165  1.1  christos @ifset man
    166  1.1  christos There are many more commands.  These are documented in the user guide.
    167  1.1  christos @end ifset
    168  1.1  christos 
    169  1.1  christos @table @code
    170  1.1  christos 
    171  1.1  christos @item callers-callees
    172  1.1  christos @ifclear man
    173  1.1  christos @IndexSubentry{Options,  @code{-callers-callees}}
    174  1.1  christos @IndexSubentry{Commands, @code{callers-callees}}
    175  1.1  christos @end ifclear
    176  1.1  christos In a callers-callees panel, it is shown which function(s) call the target
    177  1.1  christos function (the @emph{callers}) and what functions it is calling (the
    178  1.1  christos @emph{callees}).
    179  1.1  christos This command prints the callers-callees panel for each of the functions,
    180  1.1  christos in the order specified by the function sort metric.
    181  1.1  christos 
    182  1.1  christos @item calltree
    183  1.1  christos @ifclear man
    184  1.1  christos @IndexSubentry{Options,  @code{-calltree}}
    185  1.1  christos @IndexSubentry{Commands, @code{calltree}}
    186  1.1  christos @end ifclear
    187  1.1  christos Display the dynamic call graph from the experiment, showing the hierarchical
    188  1.1  christos metrics at each level.
    189  1.1  christos 
    190  1.1  christos @item compare @{on | off | delta | ratio@}
    191  1.1  christos @ifclear man
    192  1.1  christos @IndexSubentry{Options,  @code{-compare}}
    193  1.1  christos @IndexSubentry{Commands, @code{compare}}
    194  1.1  christos @end ifclear
    195  1.1  christos By default, the results for multiple experiments are aggregated.  This
    196  1.1  christos command changes this to enable the comparison of experiments for certain
    197  1.1  christos views (e.g. the function view).  The first experiment specified is defined
    198  1.1  christos to be the reference.  The following options are supported:
    199  1.1  christos 
    200  1.1  christos @table @code
    201  1.1  christos 
    202  1.1  christos @item on
    203  1.1  christos For each experiment specified on the command line, print the values for
    204  1.1  christos the metrics that have been activated for the experiment.
    205  1.1  christos 
    206  1.1  christos @item off
    207  1.1  christos Disable the comparison of experiments.  This is the default.
    208  1.1  christos 
    209  1.1  christos @item delta
    210  1.1  christos Print the values for the reference experiment.  The results for the other
    211  1.1  christos experiments are shown as a delta relative to the reference (current-reference).
    212  1.1  christos 
    213  1.1  christos @item ratio
    214  1.1  christos Print the values for the reference experiment.  The results for the other
    215  1.1  christos experiments are shown as a ratio relative to the reference (current/reference).
    216  1.1  christos 
    217  1.1  christos @end table
    218  1.1  christos 
    219  1.1  christos @item disasm @var{function-name}
    220  1.1  christos @ifclear man
    221  1.1  christos @IndexSubentry{Options,  @code{-disasm}}
    222  1.1  christos @IndexSubentry{Commands, @code{disasm}}
    223  1.1  christos @end ifclear
    224  1.1  christos List the source code and instructions for the function specified.  The
    225  1.1  christos instructions are annotated with the metrics used.
    226  1.1  christos 
    227  1.1  christos @item fsingle @var{function-name} [@samp{n}]
    228  1.1  christos @ifclear man
    229  1.1  christos @IndexSubentry{Options,  @code{-fsingle}}
    230  1.1  christos @IndexSubentry{Commands, @code{fsingle}}
    231  1.1  christos @end ifclear
    232  1.1  christos Write a summary panel for the specified function.  The optional parameter
    233  1.1  christos @var{n} is needed for those cases where several functions have the same name.
    234  1.1  christos 
    235  1.1  christos @item fsummary
    236  1.1  christos @ifclear man
    237  1.1  christos @IndexSubentry{Options,  @code{-fsummary}}
    238  1.1  christos @IndexSubentry{Commands, @code{fsummary}}
    239  1.1  christos @end ifclear
    240  1.1  christos Write a summary panel for each function in the function list.
    241  1.1  christos 
    242  1.1  christos @item functions
    243  1.1  christos @ifclear man
    244  1.1  christos @IndexSubentry{Options,  @code{-functions}}
    245  1.1  christos @IndexSubentry{Commands, @code{functions}}
    246  1.1  christos @end ifclear
    247  1.1  christos Display a list of all functions executed.  For each function the used metrics
    248  1.1  christos (e.g. the CPU time) are shown.
    249  1.1  christos 
    250  1.1  christos @item header
    251  1.1  christos @ifclear man
    252  1.1  christos @IndexSubentry{Options,  @code{-header}}
    253  1.1  christos @IndexSubentry{Commands, @code{header}}
    254  1.1  christos @end ifclear
    255  1.1  christos Shows several operational characteristics of the experiment(s) specified
    256  1.1  christos on the command line.
    257  1.1  christos 
    258  1.1  christos @item limit @var{n}
    259  1.1  christos @ifclear man
    260  1.1  christos @IndexSubentry{Options,  @code{-limit}}
    261  1.1  christos @IndexSubentry{Commands, @code{limit}}
    262  1.1  christos @end ifclear
    263  1.1  christos Limit the output to @var{n} lines.
    264  1.1  christos 
    265  1.1  christos @item lines
    266  1.1  christos @ifclear man
    267  1.1  christos @IndexSubentry{Options,  @code{-lines}}
    268  1.1  christos @IndexSubentry{Commands, @code{lines}}
    269  1.1  christos @end ifclear
    270  1.1  christos Write a list of source lines and their metrics, ordered by the current
    271  1.1  christos sort metric.
    272  1.1  christos 
    273  1.1  christos @item metric_list
    274  1.1  christos @ifclear man
    275  1.1  christos @IndexSubentry{Options,  @code{-metric_list}}
    276  1.1  christos @IndexSubentry{Commands, @code{metric_list}}
    277  1.1  christos @end ifclear
    278  1.1  christos Display the currently selected metrics in the function view and a list
    279  1.1  christos of all the metrics available for the target experiment(s).
    280  1.1  christos 
    281  1.1  christos @item metrics @var{metric-spec}
    282  1.1  christos @ifclear man
    283  1.1  christos @IndexSubentry{Options,  @code{-metrics}}
    284  1.1  christos @IndexSubentry{Commands, @code{metrics}}
    285  1.1  christos @end ifclear
    286  1.1  christos Define the metrics to be displayed in the function and callers-callees
    287  1.1  christos overviews.
    288  1.1  christos 
    289  1.1  christos The @var{metric-spec} can either be the keyword @samp{default}
    290  1.1  christos to restore the default metrics selection, or a colon separated list
    291  1.1  christos with metrics.
    292  1.1  christos 
    293  1.1  christos @ifclear man
    294  1.1  christos @IndexSubentry{Hardware event counters, @code{hwc} metric}
    295  1.1  christos @end ifclear
    296  1.1  christos A special metric is @code{hwc}.  It automatically expands to the active
    297  1.1  christos set of hardware event counters used in the experiment(s).
    298  1.1  christos 
    299  1.1  christos @ifclear man
    300  1.1  christos @IndexSubentry{Hardware event counters, @code{IPC} metric}
    301  1.1  christos @IndexSubentry{Hardware event counters, @code{CPI} metric}
    302  1.1  christos @end ifclear
    303  1.1  christos If both instructions and clock cycles have been measured, the @code{CPI}
    304  1.1  christos and @code{IPC} metrics can be used to see the Clockcycles Per Instruction
    305  1.1  christos and Instructions Per Clockcyle values, respectively.
    306  1.1  christos 
    307  1.1  christos The gprofng user guide has more details how to define metrics.
    308  1.1  christos 
    309  1.1  christos @item name @{short | long | mangled@}[:@{soname | nosoname@}]
    310  1.1  christos @ifclear man
    311  1.1  christos @IndexSubentry{Options,  @code{-name}}
    312  1.1  christos @IndexSubentry{Commands, @code{name}}
    313  1.1  christos @end ifclear
    314  1.1  christos Specify whether to use the short, long, or mangled form of function names.
    315  1.1  christos Optionally, the load object that the function is part of can be included in
    316  1.1  christos the output by adding the @emph{soname} keyword.  It can also be ommitted
    317  1.1  christos (@emph{nosoname}), which is the default.
    318  1.1  christos 
    319  1.1  christos Whether there is an actual difference between these types of names depends
    320  1.1  christos on the language.
    321  1.1  christos 
    322  1.1  christos Note that there should be no (white)space to the left and right of the
    323  1.1  christos colon (@samp{:}).
    324  1.1  christos 
    325  1.1  christos This option should not be confused with the keyword @samp{name} in a
    326  1.1  christos metric definition, which is used to specify that the names of functions
    327  1.1  christos should be shown in the function overview.
    328  1.1  christos 
    329  1.1  christos @item overview
    330  1.1  christos @ifclear man
    331  1.1  christos @IndexSubentry{Options,  @code{-overview}}
    332  1.1  christos @IndexSubentry{Commands, @code{overview}}
    333  1.1  christos @end ifclear
    334  1.1  christos Shows a summary of the recorded performance data for the experiment(s)
    335  1.1  christos specified on the command line.
    336  1.1  christos 
    337  1.1  christos @item pcs
    338  1.1  christos @ifclear man
    339  1.1  christos @IndexSubentry{Options,  @code{-pcs}}
    340  1.1  christos @IndexSubentry{Commands, @code{pcs}}
    341  1.1  christos @end ifclear
    342  1.1  christos Write a list of program counters (PCs) and their metrics, ordered by
    343  1.1  christos the current sort metric.
    344  1.1  christos 
    345  1.1  christos @item sort @var{metric-spec}
    346  1.1  christos @ifclear man
    347  1.1  christos @IndexSubentry{Options,  @code{-sort}}
    348  1.1  christos @IndexSubentry{Commands, @code{sort}}
    349  1.1  christos @end ifclear
    350  1.1  christos Sort the function list on the @var{metric-spec} given.
    351  1.1  christos 
    352  1.1  christos @IndexSubentry{Sort, Reverse order}
    353  1.1  christos The data can be sorted in reverse order by prepending the metric definition
    354  1.1  christos with a minus (@samp{-}) sign.
    355  1.1  christos 
    356  1.1  christos @noindent
    357  1.1  christos For example @command{sort -e.totalcpu}.
    358  1.1  christos 
    359  1.1  christos @IndexSubentry{Sort, Reset to default}
    360  1.1  christos A default metric for the sort operation has been defined and since this is
    361  1.1  christos a persistent command, this default can be restored with @code{default} as
    362  1.1  christos the key (@command{sort default}).
    363  1.1  christos 
    364  1.1  christos @item source @var{function-name}
    365  1.1  christos @ifclear man
    366  1.1  christos @IndexSubentry{Options,  @code{-source}}
    367  1.1  christos @IndexSubentry{Commands, @code{source}}
    368  1.1  christos @end ifclear
    369  1.1  christos List the source code for the function specified, annotated with the metrics
    370  1.1  christos used.
    371  1.1  christos 
    372  1.1  christos @item viewmode @{user | expert | machine@}
    373  1.1  christos @ifclear man
    374  1.1  christos @IndexSubentry{Options,  @code{-viewmode}}
    375  1.1  christos @IndexSubentry{Commands, @code{viewmode}}
    376  1.1  christos @end ifclear
    377  1.1  christos This command is only relevant for Java programs.  For all other languages
    378  1.1  christos supported, the viewmode setting has no effect.
    379  1.1  christos 
    380  1.1  christos The following options are supported:
    381  1.1  christos 
    382  1.1  christos @table @code
    383  1.1  christos 
    384  1.1  christos @item user
    385  1.1  christos Show the Java call stacks for Java threads, but do not show housekeeping
    386  1.1  christos threads.  The function view includes a function called @samp{<JVM-System>}.
    387  1.1  christos This represents the aggregated time from non-Java threads.
    388  1.1  christos In case the JVM software does not report a Java call stack, time is reported
    389  1.1  christos against the function @samp{<no Java callstack recorded>}.
    390  1.1  christos 
    391  1.1  christos @item expert
    392  1.1  christos Show the Java call stacks for Java threads when the user Java code is executed,
    393  1.1  christos and machine call stacks when JVM code is executed, or when the JVM software
    394  1.1  christos does not report a Java call stack.  Show the machine call stacks for
    395  1.1  christos housekeeping threads.
    396  1.1  christos 
    397  1.1  christos @item machine
    398  1.1  christos Show the actual native call stacks for all threads.  This is the view mode
    399  1.1  christos for C, C++, and Fortran.
    400  1.1  christos 
    401  1.1  christos @end table
    402  1.1  christos 
    403  1.1  christos @end table
    404  1.1  christos 
    405  1.1  christos @c man end
    406  1.1  christos @ManPageEnd{}
    407  1.1  christos 
    408  1.1  christos @c ----------------------------------------------------------------------------
    409  1.1  christos @c SEEALSO section
    410  1.1  christos @c ----------------------------------------------------------------------------
    411  1.1  christos 
    412  1.1  christos @ManPageStart{SEE ALSO}
    413  1.1  christos @c man begin SEEALSO
    414  1.1  christos 
    415  1.1  christos gprofng(1),
    416  1.1  christos gprofng-archive(1),
    417  1.1  christos gprofng-collect-app(1),
    418  1.1  christos @c -- gprofng-display-gui(1),
    419  1.1  christos gprofng-display-html(1),
    420  1.1  christos gprofng-display-src(1)
    421  1.1  christos 
    422  1.1  christos @iftex
    423  1.1  christos @vspace{1}
    424  1.1  christos @end iftex
    425  1.1  christos 
    426  1.1  christos The user guide for gprofng is maintained as a Texinfo manual.  If the
    427  1.1  christos @command{info} and @command{gprofng} programs are correctly installed, the
    428  1.1  christos command @command{info gprofng} should give access to this document.
    429  1.1  christos 
    430  1.1  christos @c man end
    431  1.1  christos @ManPageEnd{}
    432  1.1  christos 
    433  1.1  christos @c ----------------------------------------------------------------------------
    434  1.1  christos @c COPYRIGHT section
    435  1.1  christos @c ----------------------------------------------------------------------------
    436  1.1  christos 
    437  1.1  christos @ManPageStart{COPYRIGHT}
    438  1.1  christos @c man begin COPYRIGHT
    439  1.1  christos 
    440  1.1  christos Copyright @copyright{} 2022-2025 Free Software Foundation, Inc.
    441  1.1  christos 
    442  1.1  christos Permission is granted to copy, distribute and/or modify this document
    443  1.1  christos under the terms of the GNU Free Documentation License, Version 1.3
    444  1.1  christos or any later version published by the Free Software Foundation;
    445  1.1  christos with no Invariant Sections, with no Front-Cover Texts, and with no
    446  1.1  christos Back-Cover Texts.  A copy of the license is included in the
    447  1.1  christos section entitled ``GNU Free Documentation License''.
    448  1.1  christos 
    449  1.1  christos @c man end
    450  1.1  christos @ManPageEnd{}
    451  1.1  christos 
    452  1.1  christos @c ----------------------------------------------------------------------------
    453  1.1  christos @c If this text is used for a man page, exit.  Otherwise we need to continue.
    454  1.1  christos @c ----------------------------------------------------------------------------
    455  1.1  christos 
    456  1.1  christos @ifset man
    457  1.1  christos @bye
    458  1.1  christos @end ifset
    459