1PERF-ANNOTATE(1) perf Manual PERF-ANNOTATE(1)
2
3
4
6 perf-annotate - Read perf.data (created by perf record) and display
7 annotated code
8
10 perf annotate [-i <file> | --input=file] [symbol_name]
11
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
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 I synthesize interrupt or similar (asynchronous) events
64 (e.g. Intel PT Event Trace)
65 e synthesize error events
66 d create a debug log
67 f synthesize first level cache events
68 m synthesize last level cache events
69 M synthesize memory events
70 t synthesize TLB events
71 a synthesize remote access events
72 g synthesize a call chain (use with i or x)
73 G synthesize a call chain on existing event records
74 l synthesize last branch entries (use with i or x)
75 L synthesize last branch entries on existing event records
76 s skip initial number of events
77 q quicker (less detailed) decoding
78 A approximate IPC
79 Z prefer to ignore timestamps (so-called "timeless" decoding)
80
81 The default is all events i.e. the same as --itrace=ibxwpe,
82 except for perf script where it is --itrace=ce
83
84 In addition, the period (default 100000, except for perf script where it is 1)
85 for instructions events can be specified in units of:
86
87 i instructions
88 t ticks
89 ms milliseconds
90 us microseconds
91 ns nanoseconds (default)
92
93 Also the call chain size (default 16, max. 1024) for instructions or
94 transactions events can be specified.
95
96 Also the number of last branch entries (default 64, max. 1024) for
97 instructions or transactions events can be specified.
98
99 Similar to options g and l, size may also be specified for options G and L.
100 On x86, note that G and L work poorly when data has been recorded with
101 large PEBS. Refer linkperf:perf-intel-pt[1] man page for details.
102
103 It is also possible to skip events generated (instructions, branches, transactions,
104 ptwrite, power) at the beginning. This is useful to ignore initialization code.
105
106 --itrace=i0nss1000000
107
108 skips the first million instructions.
109
110 The 'e' option may be followed by flags which affect what errors will or
111 will not be reported. Each flag must be preceded by either '+' or '-'.
112 The flags are:
113 o overflow
114 l trace data lost
115
116 If supported, the 'd' option may be followed by flags which affect what
117 debug messages will or will not be logged. Each flag must be preceded
118 by either '+' or '-'. The flags are:
119 a all perf events
120 o output to stdout
121
122 If supported, the 'q' option may be repeated to increase the effect.
123
124 To disable decoding entirely, use --no-itrace.
125
126 -m, --modules
127 Load module symbols. WARNING: use only with -k and LIVE kernel.
128
129 -l, --print-line
130 Print matching source lines (may be slow).
131
132 -P, --full-paths
133 Don’t shorten the displayed pathnames.
134
135 --stdio
136 Use the stdio interface.
137
138 --stdio2
139 Use the stdio2 interface, non-interactive, uses the TUI formatting.
140
141 --stdio-color=<mode>
142 always, never or auto, allowing configuring color output via the
143 command line, in addition to via "color.ui" .perfconfig. Use
144 --stdio-color always to generate color even when redirecting to a
145 pipe or file. Using just --stdio-color is equivalent to using
146 always.
147
148 --tui
149 Use the TUI interface. Use of --tui requires a tty, if one is not
150 present, as when piping to other commands, the stdio interface is
151 used. This interfaces starts by centering on the line with more
152 samples, TAB/UNTAB cycles through the lines with more samples.
153
154 --gtk
155 Use the GTK interface.
156
157 -C, --cpu=<cpu>
158 Only report samples for the list of CPUs provided. Multiple CPUs
159 can be provided as a comma-separated list with no space: 0,1.
160 Ranges of CPUs are specified with -: 0-2. Default is to report
161 samples on all CPUs.
162
163 --asm-raw
164 Show raw instruction encoding of assembly instructions.
165
166 --show-total-period
167 Show a column with the sum of periods.
168
169 --source
170 Interleave source code with assembly code. Enabled by default,
171 disable with --no-source.
172
173 --symfs=<directory>
174 Look for files with symbols relative to this directory.
175
176 -M, --disassembler-style=
177 Set disassembler style for objdump.
178
179 --objdump=<path>
180 Path to objdump binary.
181
182 --prefix=PREFIX, --prefix-strip=N
183 Remove first N entries from source file path names in executables
184 and add PREFIX. This allows to display source code compiled on
185 systems with different file system layout.
186
187 --skip-missing
188 Skip symbols that cannot be annotated.
189
190 --group
191 Show event group information together
192
193 --demangle
194 Demangle symbol names to human readable form. It’s enabled by
195 default, disable with --no-demangle.
196
197 --demangle-kernel
198 Demangle kernel symbol names to human readable form (for C++
199 kernels).
200
201 --percent-type
202 Set annotation percent type from following choices: global-period,
203 local-period, global-hits, local-hits
204
205 The local/global keywords set if the percentage is computed
206 in the scope of the function (local) or the whole data (global).
207 The period/hits keywords set the base the percentage is computed
208 on - the samples period or the number of samples (hits).
209
211 perf-record(1), perf-report(1)
212
213
214
215perf 06/14/2022 PERF-ANNOTATE(1)