OS Manuals

/usr/bin/trace

Linux kernel performance profiling tool

From perf 6.12.116-r0 (enterprise-packages), captured 2026-11-08 by running trace --help (exit 129). permalink

 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)
OptionDescriptionSource
-a, --all-cpussystem-wide collection from all CPUshelp
-C, --cpu cpulist of cpus to monitorhelp
-D, --delay nms to wait before starting measurement after program starthelp
-e, --event eventevent/syscall selector.help
-f, --forcedon't complain, do ithelp
-F, --pf all|maj|minTrace pagefaultshelp
-G, --cgroup namemonitor event in cgroup name onlyhelp
-i, --input fileAnalyze events in filehelp
-m, --mmap-pages pagesnumber of mmap data pageshelp
-o, --output fileoutput file namehelp
-p, --pid pidtrace events on existing process idhelp
-s, --summaryShow only syscall summary with statisticshelp
-S, --with-summaryShow all syscalls and summary with statisticshelp
-t, --tid tidtrace events on existing thread idhelp
-T, --timeShow full timestamp, not time relative to first starthelp
-u, --uid useruser to profilehelp
-v, --verbosebe more verbosehelp
--call-graph record_modesetup and enables call-graph (stack chain/backtrace):help
--commshow the thread COMM next to its idhelp
--duration floatshow only events with duration > N.M mshelp
--errno-summaryShow errno stats per syscall, use with -s or -Shelp
--expr exprlist of syscalls/events to tracehelp
--failureShow only syscalls that failedhelp
--filter filterevent filterhelp
--force-btfPrefer btf_dump general pretty printerto customized oneshelp
--kernel-syscall-graphShow the kernel callchains on the syscall exit pathhelp
--libtraceevent_printUse libtraceevent to print the tracepoint arguments.help
--max-events nSet the maximum number of events to print, exit after that is reached.help
--max-stack nSet the maximum stack depth when parsing the callchain, anything beyond the specified depth will be ignored.help
--min-stack nSet the minimum stack depth when parsing the callchain, anything below the specified depth will be ignored.help
--no-inheritchild tasks do not inherit countershelp
--print-sampleprint the PERF_RECORD_SAMPLE PERF_SAMPLE_ info, for debugginghelp
--proc-map-timeout nper thread proc mmap processing timeout in mshelp
--schedshow blocking scheduler eventshelp
--show-on-off-eventsShow the on/off switch events, used with --switch-on and --switch-offhelp
--sort-eventsSort batch of events before processing, use if getting out of order eventshelp
--switch-off eventStop considering events after the occurrence of this eventhelp
--switch-on eventConsider events after the occurrence of this eventhelp
--syscallsTrace syscallshelp
--tool_statsshow tool statshelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.