Usage: perf trace [<options>] [<command>]
or: perf trace [<options>] -- <command> [<options>]
or: perf trace record [<options>] [<command>]
or: perf trace record [<options>] -- <command> [<options>]
-a, --all-cpus system-wide collection from all CPUs
-C, --cpu <cpu> list of cpus to monitor
-D, --delay <n> ms to wait before starting measurement after program start
-e, --event <event> event/syscall selector. use 'perf list' to list available events
-f, --force don't complain, do it
-F, --pf <all|maj|min>
Trace pagefaults
-G, --cgroup <name> monitor event in cgroup name only
-i, --input <file> Analyze events in file
-m, --mmap-pages <pages>
number of mmap data pages
-o, --output <file> output file name
-p, --pid <pid> trace events on existing process id
-s, --summary Show only syscall summary with statistics
-S, --with-summary Show all syscalls and summary with statistics
-t, --tid <tid> trace events on existing thread id
-T, --time Show full timestamp, not time relative to first start
-u, --uid <user> user to profile
-v, --verbose be more verbose
--call-graph <record_mode[,record_size]>
setup and enables call-graph (stack chain/backtrace):
record_mode: call graph recording mode (fp|dwarf|lbr)
record_size: if record_mode is 'dwarf', max size of stack recording (<bytes>)
default: 8192 (bytes)
Default: fp
--comm show the thread COMM next to its id
--duration <float>
show only events with duration > N.M ms
--errno-summary Show errno stats per syscall, use with -s or -S
--expr <expr> list of syscalls/events to trace
--failure Show only syscalls that failed
--filter <filter>
event filter
--filter-pids <CSV list of pids>
pids to filter (by the kernel)
--force-btf Prefer btf_dump general pretty printerto customized ones
--kernel-syscall-graph
Show the kernel callchains on the syscall exit path
--libtraceevent_print
Use libtraceevent to print the tracepoint arguments.
--max-events <n> Set the maximum number of events to print, exit after that is reached.
--max-stack <n> Set the maximum stack depth when parsing the callchain, anything beyond the specified depth will be ignored. Default: kernel.perf_event_max_stack or 127
--min-stack <n> Set the minimum stack depth when parsing the callchain, anything below the specified depth will be ignored.
--no-inherit child tasks do not inherit counters
--print-sample print the PERF_RECORD_SAMPLE PERF_SAMPLE_ info, for debugging
--proc-map-timeout <n>
per thread proc mmap processing timeout in ms
--sched show blocking scheduler events
--show-on-off-events
Show the on/off switch events, used with --switch-on and --switch-off
--sort-events Sort batch of events before processing, use if getting out of order events
--switch-off <event>
Stop considering events after the occurrence of this event
--switch-on <event>
Consider events after the occurrence of this event
--syscalls Trace syscalls
--tool_stats show tool stats
Options (40)
| Option | Description | Source |
|---|
-a, --all-cpus | system-wide collection from all CPUs | help |
-C, --cpu cpu | list of cpus to monitor | help |
-D, --delay n | ms to wait before starting measurement after program start | help |
-e, --event event | event/syscall selector. | help |
-f, --force | don't complain, do it | help |
-F, --pf all|maj|min | Trace pagefaults | help |
-G, --cgroup name | monitor event in cgroup name only | help |
-i, --input file | Analyze events in file | help |
-m, --mmap-pages pages | number of mmap data pages | help |
-o, --output file | output file name | help |
-p, --pid pid | trace events on existing process id | help |
-s, --summary | Show only syscall summary with statistics | help |
-S, --with-summary | Show all syscalls and summary with statistics | help |
-t, --tid tid | trace events on existing thread id | help |
-T, --time | Show full timestamp, not time relative to first start | help |
-u, --uid user | user to profile | help |
-v, --verbose | be more verbose | help |
--call-graph record_mode | setup and enables call-graph (stack chain/backtrace): | help |
--comm | show the thread COMM next to its id | help |
--duration float | show only events with duration > N.M ms | help |
--errno-summary | Show errno stats per syscall, use with -s or -S | help |
--expr expr | list of syscalls/events to trace | help |
--failure | Show only syscalls that failed | help |
--filter filter | event filter | help |
--force-btf | Prefer btf_dump general pretty printerto customized ones | help |
--kernel-syscall-graph | Show the kernel callchains on the syscall exit path | help |
--libtraceevent_print | Use libtraceevent to print the tracepoint arguments. | help |
--max-events n | Set the maximum number of events to print, exit after that is reached. | help |
--max-stack n | Set the maximum stack depth when parsing the callchain, anything beyond the specified depth will be ignored. | help |
--min-stack n | Set the minimum stack depth when parsing the callchain, anything below the specified depth will be ignored. | help |
--no-inherit | child tasks do not inherit counters | help |
--print-sample | print the PERF_RECORD_SAMPLE PERF_SAMPLE_ info, for debugging | help |
--proc-map-timeout n | per thread proc mmap processing timeout in ms | help |
--sched | show blocking scheduler events | help |
--show-on-off-events | Show the on/off switch events, used with --switch-on and --switch-off | help |
--sort-events | Sort batch of events before processing, use if getting out of order events | help |
--switch-off event | Stop considering events after the occurrence of this event | help |
--switch-on event | Consider events after the occurrence of this event | help |
--syscalls | Trace syscalls | help |
--tool_stats | show tool stats | help |
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.