^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) perf-ftrace(1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) ==============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) NAME
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) ----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) perf-ftrace - simple wrapper for kernel's ftrace functionality
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) SYNOPSIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) [verse]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 'perf ftrace' <command>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) DESCRIPTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) The 'perf ftrace' command is a simple wrapper of kernel's ftrace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) functionality. It only supports single thread tracing currently and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) just reads trace_pipe in text and then write it to stdout.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) The following options apply to perf ftrace.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) OPTIONS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) -------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) -t::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) --tracer=::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) Tracer to use when neither -G nor -F option is not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) specified: function_graph or function.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) -v::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) --verbose=::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) Verbosity level.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) -F::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) --funcs::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) List available functions to trace. It accepts a pattern to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) only list interested functions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) -p::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) --pid=::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) Trace on existing process id (comma separated list).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) --tid=::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) Trace on existing thread id (comma separated list).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) -D::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) --delay::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) Time (ms) to wait before starting tracing after program start.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) -a::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) --all-cpus::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) Force system-wide collection. Scripts run without a <command>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) normally use -a by default, while scripts run with a <command>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) normally don't - this option allows the latter to be run in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) system-wide mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) -C::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) --cpu=::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) Only trace for the list of CPUs provided. Multiple CPUs can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) be provided as a comma separated list with no space like: 0,1.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) Ranges of CPUs are specified with -: 0-2.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) Default is to trace on all online CPUs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) -m::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) --buffer-size::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) Set the size of per-cpu tracing buffer, <size> is expected to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) be a number with appended unit character - B/K/M/G.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) --inherit::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) Trace children processes spawned by our target.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) -T::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) --trace-funcs=::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) Select function tracer and set function filter on the given
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) function (or a glob pattern). Multiple functions can be given
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) by using this option more than once. The function argument also
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) can be a glob pattern. It will be passed to 'set_ftrace_filter'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) in tracefs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) -N::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) --notrace-funcs=::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) Select function tracer and do not trace functions given by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) argument. Like -T option, this can be used more than once to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) specify multiple functions (or glob patterns). It will be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) passed to 'set_ftrace_notrace' in tracefs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) --func-opts::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) List of options allowed to set:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) call-graph - Display kernel stack trace for function tracer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) irq-info - Display irq context info for function tracer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) -G::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) --graph-funcs=::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) Select function_graph tracer and set graph filter on the given
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) function (or a glob pattern). This is useful to trace for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) functions executed from the given function. This can be used more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) than once to specify multiple functions. It will be passed to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) 'set_graph_function' in tracefs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) -g::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) --nograph-funcs=::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) Select function_graph tracer and set graph notrace filter on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) given function (or a glob pattern). Like -G option, this is useful
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) for the function_graph tracer only and disables tracing for function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) executed from the given function. This can be used more than once to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) specify multiple functions. It will be passed to 'set_graph_notrace'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) in tracefs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) --graph-opts::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) List of options allowed to set:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) nosleep-time - Measure on-CPU time only for function_graph tracer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) noirqs - Ignore functions that happen inside interrupt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) verbose - Show process names, PIDs, timestamps, etc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) thresh=<n> - Setup trace duration threshold in microseconds.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) depth=<n> - Set max depth for function graph tracer to follow.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) SEE ALSO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) linkperf:perf-record[1], linkperf:perf-trace[1]