.. | .. |
---|
117 | 117 | Comma separated list of fields to print. Options are: |
---|
118 | 118 | comm, tid, pid, time, cpu, event, trace, ip, sym, dso, addr, symoff, |
---|
119 | 119 | srcline, period, iregs, uregs, brstack, brstacksym, flags, bpf-output, brstackinsn, |
---|
120 | | - brstackoff, callindent, insn, insnlen, synth, phys_addr, metric, misc. |
---|
| 120 | + brstackoff, callindent, insn, insnlen, synth, phys_addr, metric, misc, srccode, ipc. |
---|
121 | 121 | Field list can be prepended with the type, trace, sw or hw, |
---|
122 | 122 | to indicate to which event type the field list applies. |
---|
123 | 123 | e.g., -F sw:comm,tid,time,ip,sym and -F trace:time,cpu,trace |
---|
.. | .. |
---|
159 | 159 | the override, and the result of the above is that only S/W and H/W |
---|
160 | 160 | events are displayed with the given fields. |
---|
161 | 161 | |
---|
| 162 | + It's possible tp add/remove fields only for specific event type: |
---|
| 163 | + |
---|
| 164 | + -Fsw:-cpu,-period |
---|
| 165 | + |
---|
| 166 | + removes cpu and period from software events. |
---|
| 167 | + |
---|
162 | 168 | For the 'wildcard' option if a user selected field is invalid for an |
---|
163 | 169 | event type, a message is displayed to the user that the option is |
---|
164 | 170 | ignored for that type. For example: |
---|
.. | .. |
---|
197 | 203 | The synth field is used by synthesized events which may be created when |
---|
198 | 204 | Instruction Trace decoding. |
---|
199 | 205 | |
---|
| 206 | + The ipc (instructions per cycle) field is synthesized and may have a value when |
---|
| 207 | + Instruction Trace decoding. |
---|
| 208 | + |
---|
200 | 209 | Finally, a user may not set fields to none for all event types. |
---|
201 | 210 | i.e., -F "" is not allowed. |
---|
202 | 211 | |
---|
.. | .. |
---|
219 | 228 | |
---|
220 | 229 | With the metric option perf script can compute metrics for |
---|
221 | 230 | sampling periods, similar to perf stat. This requires |
---|
222 | | - specifying a group with multiple metrics with the :S option |
---|
| 231 | + specifying a group with multiple events defining metrics with the :S option |
---|
223 | 232 | for perf record. perf will sample on the first event, and |
---|
224 | | - compute metrics for all the events in the group. Please note |
---|
| 233 | + print computed metrics for all the events in the group. Please note |
---|
225 | 234 | that the metric computed is averaged over the whole sampling |
---|
226 | | - period, not just for the sample point. |
---|
| 235 | + period (since the last sample), not just for the sample point. |
---|
227 | 236 | |
---|
228 | 237 | For sample events it's possible to display misc field with -F +misc option, |
---|
229 | 238 | following letters are displayed for each bit: |
---|
.. | .. |
---|
307 | 316 | --show-round-events |
---|
308 | 317 | Display finished round events i.e. events of type PERF_RECORD_FINISHED_ROUND. |
---|
309 | 318 | |
---|
| 319 | +--show-bpf-events |
---|
| 320 | + Display bpf events i.e. events of type PERF_RECORD_KSYMBOL and PERF_RECORD_BPF_EVENT. |
---|
| 321 | + |
---|
| 322 | +--show-cgroup-events |
---|
| 323 | + Display cgroup events i.e. events of type PERF_RECORD_CGROUP. |
---|
| 324 | + |
---|
| 325 | +--show-text-poke-events |
---|
| 326 | + Display text poke events i.e. events of type PERF_RECORD_TEXT_POKE and |
---|
| 327 | + PERF_RECORD_KSYMBOL. |
---|
| 328 | + |
---|
310 | 329 | --demangle:: |
---|
311 | 330 | Demangle symbol names to human readable form. It's enabled by default, |
---|
312 | 331 | disable with --no-demangle. |
---|
.. | .. |
---|
349 | 368 | |
---|
350 | 369 | --time:: |
---|
351 | 370 | Only analyze samples within given time window: <start>,<stop>. Times |
---|
352 | | - have the format seconds.microseconds. If start is not given (i.e., time |
---|
| 371 | + have the format seconds.nanoseconds. If start is not given (i.e. time |
---|
353 | 372 | string is ',x.y') then analysis starts at the beginning of the file. If |
---|
354 | | - stop time is not given (i.e, time string is 'x.y,') then analysis goes |
---|
355 | | - to end of file. |
---|
| 373 | + stop time is not given (i.e. time string is 'x.y,') then analysis goes |
---|
| 374 | + to end of file. Multiple ranges can be separated by spaces, which |
---|
| 375 | + requires the argument to be quoted e.g. --time "1234.567,1234.789 1235," |
---|
356 | 376 | |
---|
357 | | - Also support time percent with multipe time range. Time string is |
---|
| 377 | + Also support time percent with multiple time ranges. Time string is |
---|
358 | 378 | 'a%/n,b%/m,...' or 'a%-b%,c%-%d,...'. |
---|
359 | 379 | |
---|
360 | 380 | For example: |
---|
.. | .. |
---|
371 | 391 | perf script --time 0%-10%,30%-40% |
---|
372 | 392 | |
---|
373 | 393 | --max-blocks:: |
---|
374 | | - Set the maximum number of program blocks to print with brstackasm for |
---|
| 394 | + Set the maximum number of program blocks to print with brstackinsn for |
---|
375 | 395 | each sample. |
---|
| 396 | + |
---|
| 397 | +--reltime:: |
---|
| 398 | + Print time stamps relative to trace start. |
---|
| 399 | + |
---|
| 400 | +--deltatime:: |
---|
| 401 | + Print time stamps relative to previous event. |
---|
376 | 402 | |
---|
377 | 403 | --per-event-dump:: |
---|
378 | 404 | Create per event files with a "perf.data.EVENT.dump" name instead of |
---|
.. | .. |
---|
383 | 409 | will be printed. Each entry has function name and file/line. Enabled by |
---|
384 | 410 | default, disable with --no-inline. |
---|
385 | 411 | |
---|
| 412 | +--insn-trace:: |
---|
| 413 | + Show instruction stream for intel_pt traces. Combine with --xed to |
---|
| 414 | + show disassembly. |
---|
| 415 | + |
---|
| 416 | +--xed:: |
---|
| 417 | + Run xed disassembler on output. Requires installing the xed disassembler. |
---|
| 418 | + |
---|
| 419 | +-S:: |
---|
| 420 | +--symbols=symbol[,symbol...]:: |
---|
| 421 | + Only consider the listed symbols. Symbols are typically a name |
---|
| 422 | + but they may also be hexadecimal address. |
---|
| 423 | + |
---|
| 424 | + For example, to select the symbol noploop or the address 0x4007a0: |
---|
| 425 | + perf script --symbols=noploop,0x4007a0 |
---|
| 426 | + |
---|
| 427 | +--call-trace:: |
---|
| 428 | + Show call stream for intel_pt traces. The CPUs are interleaved, but |
---|
| 429 | + can be filtered with -C. |
---|
| 430 | + |
---|
| 431 | +--call-ret-trace:: |
---|
| 432 | + Show call and return stream for intel_pt traces. |
---|
| 433 | + |
---|
| 434 | +--graph-function:: |
---|
| 435 | + For itrace only show specified functions and their callees for |
---|
| 436 | + itrace. Multiple functions can be separated by comma. |
---|
| 437 | + |
---|
| 438 | +--switch-on EVENT_NAME:: |
---|
| 439 | + Only consider events after this event is found. |
---|
| 440 | + |
---|
| 441 | +--switch-off EVENT_NAME:: |
---|
| 442 | + Stop considering events after this event is found. |
---|
| 443 | + |
---|
| 444 | +--show-on-off-events:: |
---|
| 445 | + Show the --switch-on/off events too. |
---|
| 446 | + |
---|
| 447 | +--stitch-lbr:: |
---|
| 448 | + Show callgraph with stitched LBRs, which may have more complete |
---|
| 449 | + callgraph. The perf.data file must have been obtained using |
---|
| 450 | + perf record --call-graph lbr. |
---|
| 451 | + Disabled by default. In common cases with call stack overflows, |
---|
| 452 | + it can recreate better call stacks than the default lbr call stack |
---|
| 453 | + output. But this approach is not full proof. There can be cases |
---|
| 454 | + where it creates incorrect call stacks from incorrect matches. |
---|
| 455 | + The known limitations include exception handing such as |
---|
| 456 | + setjmp/longjmp will have calls/returns not match. |
---|
| 457 | + |
---|
386 | 458 | SEE ALSO |
---|
387 | 459 | -------- |
---|
388 | 460 | linkperf:perf-record[1], linkperf:perf-script-perl[1], |
---|
389 | | -linkperf:perf-script-python[1] |
---|
| 461 | +linkperf:perf-script-python[1], linkperf:perf-intel-pt[1] |
---|