1PERF-ANNOTATE(1)                  perf Manual                 PERF-ANNOTATE(1)
2
3
4

NAME

6       perf-annotate - Read perf.data (created by perf record) and display
7       annotated code
8

SYNOPSIS

10       perf annotate [-i <file> | --input=file] [symbol_name]
11

DESCRIPTION

13       This command reads the input file and displays an annotated version of
14       the code. If the object file has debug symbols then the source code
15       will be displayed alongside assembly code.
16
17       If there is no debug info in the object, then annotated assembly is
18       displayed.
19

OPTIONS

21       -i, --input=<file>
22           Input file name. (default: perf.data unless stdin is a fifo)
23
24       -d, --dsos=<dso[,dso...]>
25           Only consider symbols in these dsos.
26
27       -s, --symbol=<symbol>
28           Symbol to annotate.
29
30       -f, --force
31           Don’t do ownership validation.
32
33       -v, --verbose
34           Be more verbose. (Show symbol address, etc)
35
36       -q, --quiet
37           Do not show any message. (Suppress -v)
38
39       -n, --show-nr-samples
40           Show the number of samples for each symbol
41
42       -D, --dump-raw-trace
43           Dump raw trace in ASCII.
44
45       -k, --vmlinux=<file>
46           vmlinux pathname.
47
48       --ignore-vmlinux
49           Ignore vmlinux files.
50
51       --itrace
52           Options for decoding instruction tracing data. The options are:
53
54               i       synthesize instructions events
55               b       synthesize branches events (branch misses for Arm SPE)
56               c       synthesize branches events (calls only)
57               r       synthesize branches events (returns only)
58               x       synthesize transactions events
59               w       synthesize ptwrite events
60               p       synthesize power events (incl. PSB events for Intel PT)
61               o       synthesize other events recorded due to the use
62                       of aux-output (refer to perf record)
63               e       synthesize error events
64               d       create a debug log
65               f       synthesize first level cache events
66               m       synthesize last level cache events
67               M       synthesize memory events
68               t       synthesize TLB events
69               a       synthesize remote access events
70               g       synthesize a call chain (use with i or x)
71               G       synthesize a call chain on existing event records
72               l       synthesize last branch entries (use with i or x)
73               L       synthesize last branch entries on existing event records
74               s       skip initial number of events
75               q       quicker (less detailed) decoding
76               Z       prefer to ignore timestamps (so-called "timeless" decoding)
77
78               The default is all events i.e. the same as --itrace=ibxwpe,
79               except for perf script where it is --itrace=ce
80
81               In addition, the period (default 100000, except for perf script where it is 1)
82               for instructions events can be specified in units of:
83
84               i       instructions
85               t       ticks
86               ms      milliseconds
87               us      microseconds
88               ns      nanoseconds (default)
89
90               Also the call chain size (default 16, max. 1024) for instructions or
91               transactions events can be specified.
92
93               Also the number of last branch entries (default 64, max. 1024) for
94               instructions or transactions events can be specified.
95
96               Similar to options g and l, size may also be specified for options G and L.
97               On x86, note that G and L work poorly when data has been recorded with
98               large PEBS. Refer linkperf:perf-intel-pt[1] man page for details.
99
100               It is also possible to skip events generated (instructions, branches, transactions,
101               ptwrite, power) at the beginning. This is useful to ignore initialization code.
102
103               --itrace=i0nss1000000
104
105               skips the first million instructions.
106
107               The 'e' option may be followed by flags which affect what errors will or
108               will not be reported. Each flag must be preceded by either '+' or '-'.
109               The flags are:
110                       o       overflow
111                       l       trace data lost
112
113               If supported, the 'd' option may be followed by flags which affect what
114               debug messages will or will not be logged. Each flag must be preceded
115               by either '+' or '-'. The flags are:
116                       a       all perf events
117
118               If supported, the 'q' option may be repeated to increase the effect.
119
120               To disable decoding entirely, use --no-itrace.
121
122       -m, --modules
123           Load module symbols. WARNING: use only with -k and LIVE kernel.
124
125       -l, --print-line
126           Print matching source lines (may be slow).
127
128       -P, --full-paths
129           Don’t shorten the displayed pathnames.
130
131       --stdio
132           Use the stdio interface.
133
134       --stdio2
135           Use the stdio2 interface, non-interactive, uses the TUI formatting.
136
137       --stdio-color=<mode>
138           always, never or auto, allowing configuring color output via the
139           command line, in addition to via "color.ui" .perfconfig. Use
140           --stdio-color always to generate color even when redirecting to a
141           pipe or file. Using just --stdio-color is equivalent to using
142           always.
143
144       --tui
145           Use the TUI interface. Use of --tui requires a tty, if one is not
146           present, as when piping to other commands, the stdio interface is
147           used. This interfaces starts by centering on the line with more
148           samples, TAB/UNTAB cycles through the lines with more samples.
149
150       --gtk
151           Use the GTK interface.
152
153       -C, --cpu=<cpu>
154           Only report samples for the list of CPUs provided. Multiple CPUs
155           can be provided as a comma-separated list with no space: 0,1.
156           Ranges of CPUs are specified with -: 0-2. Default is to report
157           samples on all CPUs.
158
159       --asm-raw
160           Show raw instruction encoding of assembly instructions.
161
162       --show-total-period
163           Show a column with the sum of periods.
164
165       --source
166           Interleave source code with assembly code. Enabled by default,
167           disable with --no-source.
168
169       --symfs=<directory>
170           Look for files with symbols relative to this directory.
171
172       -M, --disassembler-style=
173           Set disassembler style for objdump.
174
175       --objdump=<path>
176           Path to objdump binary.
177
178       --prefix=PREFIX, --prefix-strip=N
179           Remove first N entries from source file path names in executables
180           and add PREFIX. This allows to display source code compiled on
181           systems with different file system layout.
182
183       --skip-missing
184           Skip symbols that cannot be annotated.
185
186       --group
187           Show event group information together
188
189       --demangle
190           Demangle symbol names to human readable form. It’s enabled by
191           default, disable with --no-demangle.
192
193       --demangle-kernel
194           Demangle kernel symbol names to human readable form (for C++
195           kernels).
196
197       --percent-type
198           Set annotation percent type from following choices: global-period,
199           local-period, global-hits, local-hits
200
201               The local/global keywords set if the percentage is computed
202               in the scope of the function (local) or the whole data (global).
203               The period/hits keywords set the base the percentage is computed
204               on - the samples period or the number of samples (hits).
205

SEE ALSO

207       perf-record(1), perf-report(1)
208
209
210
211perf                              11/22/2021                  PERF-ANNOTATE(1)
Impressum