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 -a::
102 Force system-wide collection. Scripts run without a <command>
103 normally use -a by default, while scripts run with a <command>
104 normally don't - this option allows the latter to be run in
105 system-wide mode.
107 -i::
108 --input=::
111 -d::
112 --debug-mode::
115 -F::
116 --fields::
118 comm, tid, pid, time, cpu, event, trace, ip, sym, dso, addr, symoff,
119 srcline, period, iregs, uregs, brstack, brstacksym, flags, bpf-output, brstackinsn,
123 e.g., -F sw:comm,tid,time,ip,sym and -F trace:time,cpu,trace
125 perf script -F <fields>
129 perf script -F trace:<fields> -F sw:<fields> -F hw:<fields>
137 -F -cpu,+insn
145 -F trace: -F comm,tid,time,ip,sym
147 The first -F suppresses trace events (field list is ""), but then the
148 second invocation sets the fields to comm,tid,time,ip,sym. In this case a
155 -F comm,tid,time,ip,sym -F trace:
157 The first -F sets the fields for all events and the second -F
164 -Fsw:-cpu,-period
172 $ perf script -F comm,tid,trace
179 perf script -v -F sw:comm,tid,trace
182 At this point usage is displayed, and perf-script exits.
210 i.e., -F "" is not allowed.
216 …M/P/-: M=branch target mispredicted or branch direction was mispredicted, P=target predicted or di…
217 X/- : X=branch inside a transactional region, -=not in transaction region or not supported
218 A/- : A=TSX abort entry, -=not aborted region or not supported
225 sample was recorded with perf record -b or -j any.
237 For sample events it's possible to display misc field with -F +misc option,
250 $ perf script -F +misc ...
251 sched-messaging 1414 K 28690.636582: 4590 cycles ...
252 sched-messaging 1407 U 28690.636600: 325620 cycles ...
253 sched-messaging 1414 K 28690.636608: 19473 cycles ...
256 -k::
257 --vmlinux=<file>::
260 --kallsyms=<file>::
263 --symfs=<directory>::
266 -G::
267 --hide-call-graph::
270 --stop-bt::
273 -C::
274 --cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
275 be provided as a comma-separated list with no space: 0,1. Ranges of
276 CPUs are specified with -: 0-2. Default is to report samples on all
279 -c::
280 --comms=::
284 --pid=::
287 --tid=::
290 -I::
291 --show-info::
297 --show-kernel-path::
300 --show-task-events
303 --show-mmap-events
306 --show-namespace-events
309 --show-switch-events
313 --show-lost-events
316 --show-round-events
319 --show-bpf-events
322 --show-cgroup-events
325 --show-text-poke-events
329 --demangle::
331 disable with --no-demangle.
333 --demangle-kernel::
336 --header
339 --header-only
342 --itrace::
347 To disable decoding entirely, use --no-itrace.
349 --full-source-path::
352 --max-stack::
354 beyond the specified depth will be ignored. This is a trade-off
357 Note that when using the --itrace option the synthesized callchain size
362 --ns::
363 Use 9 decimal places when displaying time (i.e. show the nanoseconds)
365 -f::
366 --force::
369 --time::
370 Only analyze samples within given time window: <start>,<stop>. Times
371 have the format seconds.nanoseconds. If start is not given (i.e. time
373 stop time is not given (i.e. time string is 'x.y,') then analysis goes
375 requires the argument to be quoted e.g. --time "1234.567,1234.789 1235,"
377 Also support time percent with multiple time ranges. Time string is
378 'a%/n,b%/m,...' or 'a%-b%,c%-%d,...'.
381 Select the second 10% time slice:
382 perf script --time 10%/2
384 Select from 0% to 10% time slice:
385 perf script --time 0%-10%
387 Select the first and second 10% time slices:
388 perf script --time 10%/1,10%/2
391 perf script --time 0%-10%,30%-40%
393 --max-blocks::
397 --reltime::
398 Print time stamps relative to trace start.
400 --deltatime::
401 Print time stamps relative to previous event.
403 --per-event-dump::
407 --inline::
410 default, disable with --no-inline.
412 --insn-trace::
413 Show instruction stream for intel_pt traces. Combine with --xed to
416 --xed::
417 Run xed disassembler on output. Requires installing the xed disassembler.
419 -S::
420 --symbols=symbol[,symbol...]::
425 perf script --symbols=noploop,0x4007a0
427 --call-trace::
429 can be filtered with -C.
431 --call-ret-trace::
434 --graph-function::
438 --switch-on EVENT_NAME::
441 --switch-off EVENT_NAME::
444 --show-on-off-events::
445 Show the --switch-on/off events too.
447 --stitch-lbr::
450 perf record --call-graph lbr.
459 --------
460 linkperf:perf-record[1], linkperf:perf-script-perl[1],
461 linkperf:perf-script-python[1], linkperf:perf-intel-pt[1]