Lines Matching +full:run +full:- +full:time
1 perf-script(1)
5 ----
6 perf-script - Read perf.data (created by perf record) and display trace output
9 --------
12 'perf script' [<options>] record <script> [<record-options>] <command>
13 'perf script' [<options>] report <script> [script-args]
14 'perf script' [<options>] <script> <required-script-args> [<record-options>] <command>
15 'perf script' [<options>] <top-script> [script-args]
18 -----------
26 You can also run a set of pre-canned scripts that aggregate and
28 available via 'perf script -l'). The following variants allow you to
29 record and run those scripts:
33 output of 'perf script --list' i.e. the actual script name minus any
35 recorded using the -a (system-wide) 'perf record' option.
37 'perf script report <script> [args]' to run and display the results
39 script --list' i.e. the actual script name minus any language
40 extension. The perf.data output from a previous run of 'perf script
45 'perf script <script> <required-script-args> <command>' to both
46 record the events required for <script> and to run the <script>
47 using 'live-mode' i.e. without writing anything to disk. <script>
48 is the name displayed in the output of 'perf script --list' i.e. the
50 not specified, the events are recorded using the -a (system-wide)
56 piped to the stdin of the report script, using the '-o -' and '-i -'
59 'perf script <top-script>' to both record the events required for
60 <top-script> and to run the <top-script> using 'live-mode'
61 i.e. without writing anything to disk. <top-script> is the name
62 displayed in the output of 'perf script --list' i.e. the actual
63 script name minus any language extension; a <top-script> is defined
66 [<record-options>] can be passed to the record steps of 'perf script
67 record' and 'live-mode' variants; this isn't possible however for
68 <top-script> 'live-mode' or 'perf script report' variants.
70 See the 'SEE ALSO' section for links to language-specific
71 information on how to write and run your own trace scripts.
74 -------
78 -D::
79 --dump-raw-trace=::
82 -L::
83 --Latency=::
86 -l::
87 --list=::
90 -s ['lang']::
91 --script=::
96 -g::
97 --gen-script=::
98 Generate perf-script.[ext] starter script for given language,
101 --dlfilter=<file>::
103 Refer linkperf:perf-dlfilter[1]
105 --dlarg=<arg>::
106 Pass 'arg' as an argument to the dlfilter. --dlarg may be repeated
109 --list-dlfilters::
110 Display a list of available dlfilters. Use with option -v (must come
111 before option --list-dlfilters) to show long descriptions.
113 -a::
114 Force system-wide collection. Scripts run without a <command>
115 normally use -a by default, while scripts run with a <command>
116 normally don't - this option allows the latter to be run in
117 system-wide mode.
119 -i::
120 --input=::
123 -d::
124 --debug-mode::
127 -F::
128 --fields::
130 comm, tid, pid, time, cpu, event, trace, ip, sym, dso, addr, symoff,
131 srcline, period, iregs, uregs, brstack, brstacksym, flags, bpf-output,
136 e.g., -F sw:comm,tid,time,ip,sym and -F trace:time,cpu,trace
138 perf script -F <fields>
142 perf script -F trace:<fields> -F sw:<fields> -F hw:<fields>
150 -F -cpu,+insn
158 -F trace: -F comm,tid,time,ip,sym
160 The first -F suppresses trace events (field list is ""), but then the
161 second invocation sets the fields to comm,tid,time,ip,sym. In this case a
168 -F comm,tid,time,ip,sym -F trace:
170 The first -F sets the fields for all events and the second -F
177 -Fsw:-cpu,-period
185 $ perf script -F comm,tid,trace
192 perf script -v -F sw:comm,tid,trace
195 At this point usage is displayed, and perf-script exits.
200 transaction abort, trace begin, trace end, in transaction, VM-Entry, and VM-Exit
224 i.e., -F "" is not allowed.
230 …M/P/-: M=branch target mispredicted or branch direction was mispredicted, P=target predicted or di…
231 X/- : X=branch inside a transactional region, -=not in transaction region or not supported
232 A/- : A=TSX abort entry, -=not aborted region or not supported
239 sample was recorded with perf record -b or -j any.
251 For sample events it's possible to display misc field with -F +misc option,
264 $ perf script -F +misc ...
265 sched-messaging 1414 K 28690.636582: 4590 cycles ...
266 sched-messaging 1407 U 28690.636600: 325620 cycles ...
267 sched-messaging 1414 K 28690.636608: 19473 cycles ...
270 -k::
271 --vmlinux=<file>::
274 --kallsyms=<file>::
277 --symfs=<directory>::
280 -G::
281 --hide-call-graph::
284 --stop-bt::
287 -C::
288 --cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
289 be provided as a comma-separated list with no space: 0,1. Ranges of
290 CPUs are specified with -: 0-2. Default is to report samples on all
293 -c::
294 --comms=::
298 --pid=::
301 --tid=::
304 -I::
305 --show-info::
311 --show-kernel-path::
314 --show-task-events
317 --show-mmap-events
320 --show-namespace-events
323 --show-switch-events
327 --show-lost-events
330 --show-round-events
333 --show-bpf-events
336 --show-cgroup-events
339 --show-text-poke-events
343 --demangle::
345 disable with --no-demangle.
347 --demangle-kernel::
350 --header
353 --header-only
356 --itrace::
361 To disable decoding entirely, use --no-itrace.
363 --full-source-path::
366 --max-stack::
368 beyond the specified depth will be ignored. This is a trade-off
371 Note that when using the --itrace option the synthesized callchain size
376 --ns::
377 Use 9 decimal places when displaying time (i.e. show the nanoseconds)
379 -f::
380 --force::
383 --time::
384 Only analyze samples within given time window: <start>,<stop>. Times
385 have the format seconds.nanoseconds. If start is not given (i.e. time
387 stop time is not given (i.e. time string is 'x.y,') then analysis goes
389 requires the argument to be quoted e.g. --time "1234.567,1234.789 1235,"
391 Also support time percent with multiple time ranges. Time string is
392 'a%/n,b%/m,...' or 'a%-b%,c%-%d,...'.
395 Select the second 10% time slice:
396 perf script --time 10%/2
398 Select from 0% to 10% time slice:
399 perf script --time 0%-10%
401 Select the first and second 10% time slices:
402 perf script --time 10%/1,10%/2
405 perf script --time 0%-10%,30%-40%
407 --max-blocks::
411 --reltime::
412 Print time stamps relative to trace start.
414 --deltatime::
415 Print time stamps relative to previous event.
417 --per-event-dump::
421 --inline::
424 default, disable with --no-inline.
426 --insn-trace::
427 Show instruction stream for intel_pt traces. Combine with --xed to
430 --xed::
431 Run xed disassembler on output. Requires installing the xed disassembler.
433 -S::
434 --symbols=symbol[,symbol...]::
442 perf script --symbols=noploop,0x4007a0
452 4. address range comparison (see --addr-range).
454 --addr-range::
455 Use with -S or --symbols to list traced records within address range.
459 perf script -S 0x4007a0 --addr-range 10
461 --dsos=::
464 --call-trace::
466 can be filtered with -C.
468 --call-ret-trace::
471 --graph-function::
475 --switch-on EVENT_NAME::
478 --switch-off EVENT_NAME::
481 --show-on-off-events::
482 Show the --switch-on/off events too.
484 --stitch-lbr::
487 perf record --call-graph lbr.
496 --------
497 linkperf:perf-record[1], linkperf:perf-script-perl[1],
498 linkperf:perf-script-python[1], linkperf:perf-intel-pt[1],
499 linkperf:perf-dlfilter[1]