1 @c ----------------------------------------------------------------------------
2 @c This is the Texinfo source file for the gp-display-text man page.
4 @c Author: Ruud van der Pas
5 @c ----------------------------------------------------------------------------
7 \input texinfo @c -*-texinfo-*-
8 @setfilename gp-display-text
9 @settitle Display the performance data in plain text format
10 @include gp-macros.texi
13 @c ----------------------------------------------------------------------------
14 @c This is from the man-pages(7) man page
16 @c "The list below shows conventional or suggested sections. Most manual pages
17 @c should include at least the highlighted sections. Arrange a new manual
18 @c page so that sections are placed in the order shown in the list."
22 @c CONFIGURATION [Normally only in Section 4]
24 @c OPTIONS [Normally only in Sections 1, 8]
25 @c EXIT STATUS [Normally only in Sections 1, 8]
26 @c RETURN VALUE [Normally only in Sections 2, 3]
27 @c ERRORS [Typically only in Sections 2, 3]
30 @c VERSIONS [Normally only in Sections 2, 3]
31 @c ATTRIBUTES [Normally only in Sections 2, 3]
36 @c AUTHORS [Discouraged]
37 @c REPORTING BUGS [Not used in man-pages]
38 @c COPYRIGHT [Not used in man-pages]
41 @c This is what the texi2pod.pl tool recognizes:
43 @c for $sect (qw(NAME SYNOPSIS TARGET DESCRIPTION OPTIONS ENVIRONMENT FILES
44 @c BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
46 @c What is interesting is that it places "SEE ALSO" before "COPYRIGHT", which
47 @c makes sense and adhered to for the other formats.
48 @c ----------------------------------------------------------------------------
50 @c ----------------------------------------------------------------------------
52 @c ----------------------------------------------------------------------------
57 gp-display-text - Display the performance data in plain text format
62 @c ----------------------------------------------------------------------------
64 @c ----------------------------------------------------------------------------
66 @ManPageStart{SYNOPSIS}
69 @command{gprofng display text} [@var{option(s)}] [@var{commands}]
70 [-script @var{script-file}] @var{experiment(s)}
75 @c ----------------------------------------------------------------------------
76 @c DESCRIPTION section
77 @c ----------------------------------------------------------------------------
79 @ManPageStart{DESCRIPTION}
80 @c man begin DESCRIPTION
82 Print a plain text version of the various displays supported by gprofng.
84 The input consists of one or more experiment directories. Through commands,
85 the user controls the output.
87 There is a rich set of commands to control the display of the data. The
88 @samp{NOTES} section lists the most common ones. The gprofng user guide
89 lists all the commands supported.
91 Commands specified on the command line need to be prepended with the dash ('-')
94 In this example, a function overview will be shown, followed by the source
95 code listing of function @samp{my-func}, annotated with the
96 performance metrics that have been recorded during the data collection
97 and stored in experiment directory @samp{my-exp.er}:
100 $ gprofng display text -functions -source my-func my-exp.er
103 Instead of, or in addition to, specifying these commands on the command line,
104 commands may also be included in a file called the @var{script-file}.
106 Note that the commands are processed and interpreted from left to right,
107 @emph{so the order matters}.
109 If this tool is invoked without options, commands, or a script file, it
110 starts in interpreter mode. The user can then issue the commands
111 interactively. The session is terminated with the @command{exit} command in
117 @c ----------------------------------------------------------------------------
119 @c ----------------------------------------------------------------------------
121 @ManPageStart{OPTIONS}
128 @IndexSubentry{Options, @code{--version}}
131 Print the version number and exit.
135 @IndexSubentry{Options, @code{--help}}
138 Print usage information and exit.
140 @item -script @var{script-file}
142 @IndexSubentry{Options, @code{-script}}
143 @IndexSubentry{Commands, @code{script}}
146 Execute the commands stored in the script file. This feature may be combined
147 with commands specified at the command line.
154 @c ----------------------------------------------------------------------------
156 @c ----------------------------------------------------------------------------
161 Many commands are supported. Below, the more common ones are listed in
162 mostly alphabetical order, because sometimes it is more logical to
163 swap the order of two entries.
166 There are many more commands. These are documented in the user guide.
171 @item callers-callees
173 @IndexSubentry{Options, @code{-callers-callees}}
174 @IndexSubentry{Commands, @code{callers-callees}}
176 In a callers-callees panel, it is shown which function(s) call the target
177 function (the @emph{callers}) and what functions it is calling (the
179 This command prints the callers-callees panel for each of the functions,
180 in the order specified by the function sort metric.
184 @IndexSubentry{Options, @code{-calltree}}
185 @IndexSubentry{Commands, @code{calltree}}
187 Display the dynamic call graph from the experiment, showing the hierarchical
188 metrics at each level.
190 @item compare @{on | off | delta | ratio@}
192 @IndexSubentry{Options, @code{-compare}}
193 @IndexSubentry{Commands, @code{compare}}
195 By default, the results for multiple experiments are aggregated. This
196 command changes this to enable the comparison of experiments for certain
197 views (e.g. the function view). The first experiment specified is defined
198 to be the reference. The following options are supported:
203 For each experiment specified on the command line, print the values for
204 the metrics that have been activated for the experiment.
207 Disable the comparison of experiments. This is the default.
210 Print the values for the reference experiment. The results for the other
211 experiments are shown as a delta relative to the reference (current-reference).
214 Print the values for the reference experiment. The results for the other
215 experiments are shown as a ratio relative to the reference (current/reference).
219 @item disasm @var{function-name}
221 @IndexSubentry{Options, @code{-disasm}}
222 @IndexSubentry{Commands, @code{disasm}}
224 List the source code and instructions for the function specified. The
225 instructions are annotated with the metrics used.
227 @item fsingle @var{function-name} [@samp{n}]
229 @IndexSubentry{Options, @code{-fsingle}}
230 @IndexSubentry{Commands, @code{fsingle}}
232 Write a summary panel for the specified function. The optional parameter
233 @var{n} is needed for those cases where several functions have the same name.
237 @IndexSubentry{Options, @code{-fsummary}}
238 @IndexSubentry{Commands, @code{fsummary}}
240 Write a summary panel for each function in the function list.
244 @IndexSubentry{Options, @code{-functions}}
245 @IndexSubentry{Commands, @code{functions}}
247 Display a list of all functions executed. For each function the used metrics
248 (e.g. the CPU time) are shown.
252 @IndexSubentry{Options, @code{-header}}
253 @IndexSubentry{Commands, @code{header}}
255 Shows several operational characteristics of the experiment(s) specified
260 @IndexSubentry{Options, @code{-limit}}
261 @IndexSubentry{Commands, @code{limit}}
263 Limit the output to @var{n} lines.
267 @IndexSubentry{Options, @code{-lines}}
268 @IndexSubentry{Commands, @code{lines}}
270 Write a list of source lines and their metrics, ordered by the current
275 @IndexSubentry{Options, @code{-metric_list}}
276 @IndexSubentry{Commands, @code{metric_list}}
278 Display the currently selected metrics in the function view and a list
279 of all the metrics available for the target experiment(s).
281 @item metrics @var{metric-spec}
283 @IndexSubentry{Options, @code{-metrics}}
284 @IndexSubentry{Commands, @code{metrics}}
286 Define the metrics to be displayed in the function and callers-callees
289 The @var{metric-spec} can either be the keyword @samp{default}
290 to restore the default metrics selection, or a colon separated list
294 @IndexSubentry{Hardware event counters, @code{hwc} metric}
296 A special metric is @code{hwc}. It automatically expands to the active
297 set of hardware event counters used in the experiment(s).
300 @IndexSubentry{Hardware event counters, @code{IPC} metric}
301 @IndexSubentry{Hardware event counters, @code{CPI} metric}
303 If both instructions and clock cycles have been measured, the @code{CPI}
304 and @code{IPC} metrics can be used to see the Clockcycles Per Instruction
305 and Instructions Per Clockcyle values, respectively.
307 The gprofng user guide has more details how to define metrics.
309 @item name @{short | long | mangled@}[:@{soname | nosoname@}]
311 @IndexSubentry{Options, @code{-name}}
312 @IndexSubentry{Commands, @code{name}}
314 Specify whether to use the short, long, or mangled form of function names.
315 Optionally, the load object that the function is part of can be included in
316 the output by adding the @emph{soname} keyword. It can also be ommitted
317 (@emph{nosoname}), which is the default.
319 Whether there is an actual difference between these types of names depends
322 Note that there should be no (white)space to the left and right of the
325 This option should not be confused with the keyword @samp{name} in a
326 metric definition, which is used to specify that the names of functions
327 should be shown in the function overview.
331 @IndexSubentry{Options, @code{-overview}}
332 @IndexSubentry{Commands, @code{overview}}
334 Shows a summary of the recorded performance data for the experiment(s)
335 specified on the command line.
339 @IndexSubentry{Options, @code{-pcs}}
340 @IndexSubentry{Commands, @code{pcs}}
342 Write a list of program counters (PCs) and their metrics, ordered by
343 the current sort metric.
345 @item sort @var{metric-spec}
347 @IndexSubentry{Options, @code{-sort}}
348 @IndexSubentry{Commands, @code{sort}}
350 Sort the function list on the @var{metric-spec} given.
352 @IndexSubentry{Sort, Reverse order}
353 The data can be sorted in reverse order by prepending the metric definition
354 with a minus (@samp{-}) sign.
357 For example @command{sort -e.totalcpu}.
359 @IndexSubentry{Sort, Reset to default}
360 A default metric for the sort operation has been defined and since this is
361 a persistent command, this default can be restored with @code{default} as
362 the key (@command{sort default}).
364 @item source @var{function-name}
366 @IndexSubentry{Options, @code{-source}}
367 @IndexSubentry{Commands, @code{source}}
369 List the source code for the function specified, annotated with the metrics
372 @item viewmode @{user | expert | machine@}
374 @IndexSubentry{Options, @code{-viewmode}}
375 @IndexSubentry{Commands, @code{viewmode}}
377 This command is only relevant for Java programs. For all other languages
378 supported, the viewmode setting has no effect.
380 The following options are supported:
385 Show the Java call stacks for Java threads, but do not show housekeeping
386 threads. The function view includes a function called @samp{<JVM-System>}.
387 This represents the aggregated time from non-Java threads.
388 In case the JVM software does not report a Java call stack, time is reported
389 against the function @samp{<no Java callstack recorded>}.
392 Show the Java call stacks for Java threads when the user Java code is executed,
393 and machine call stacks when JVM code is executed, or when the JVM software
394 does not report a Java call stack. Show the machine call stacks for
395 housekeeping threads.
398 Show the actual native call stacks for all threads. This is the view mode
399 for C, C++, and Fortran.
408 @c ----------------------------------------------------------------------------
410 @c ----------------------------------------------------------------------------
412 @ManPageStart{SEE ALSO}
426 The user guide for gprofng is maintained as a Texinfo manual. If the
427 @command{info} and @command{gprofng} programs are correctly installed, the
428 command @command{info gprofng} should give access to this document.
433 @c ----------------------------------------------------------------------------
435 @c ----------------------------------------------------------------------------
437 @ManPageStart{COPYRIGHT}
438 @c man begin COPYRIGHT
440 Copyright @copyright{} 2022-2024 Free Software Foundation, Inc.
442 Permission is granted to copy, distribute and/or modify this document
443 under the terms of the GNU Free Documentation License, Version 1.3
444 or any later version published by the Free Software Foundation;
445 with no Invariant Sections, with no Front-Cover Texts, and with no
446 Back-Cover Texts. A copy of the license is included in the
447 section entitled ``GNU Free Documentation License''.
452 @c ----------------------------------------------------------------------------
453 @c If this text is used for a man page, exit. Otherwise we need to continue.
454 @c ----------------------------------------------------------------------------