Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf ftrace latency: Update documentation

Add description of 'perf ftrace latency' subcommand.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Changbin Du <changbin.du@gmail.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: https://lore.kernel.org/r/20220321234609.90455-2-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Namhyung Kim and committed by
Arnaldo Carvalho de Melo
feff0839 84005bb6

+53 -24
+53 -24
tools/perf/Documentation/perf-ftrace.txt
··· 9 9 SYNOPSIS 10 10 -------- 11 11 [verse] 12 - 'perf ftrace' <command> 12 + 'perf ftrace' {trace|latency} <command> 13 13 14 14 DESCRIPTION 15 15 ----------- 16 - The 'perf ftrace' command is a simple wrapper of kernel's ftrace 17 - functionality. It only supports single thread tracing currently and 18 - just reads trace_pipe in text and then write it to stdout. 16 + The 'perf ftrace' command provides a collection of subcommands which use 17 + kernel's ftrace infrastructure. 18 + 19 + 'perf ftrace trace' is a simple wrapper of the ftrace. It only supports 20 + single thread tracing currently and just reads trace_pipe in text and then 21 + write it to stdout. 22 + 23 + 'perf ftrace latency' calculates execution latency of a given function 24 + (optionally with BPF) and display it as a histogram. 19 25 20 26 The following options apply to perf ftrace. 21 27 22 - OPTIONS 23 - ------- 24 - 25 - -t:: 26 - --tracer=:: 27 - Tracer to use when neither -G nor -F option is not 28 - specified: function_graph or function. 29 - 30 - -v:: 31 - --verbose:: 32 - Increase the verbosity level. 33 - 34 - -F:: 35 - --funcs:: 36 - List available functions to trace. It accepts a pattern to 37 - only list interested functions. 28 + COMMON OPTIONS 29 + -------------- 38 30 39 31 -p:: 40 32 --pid=:: ··· 34 42 35 43 --tid=:: 36 44 Trace on existing thread id (comma separated list). 37 - 38 - -D:: 39 - --delay:: 40 - Time (ms) to wait before starting tracing after program start. 41 45 42 46 -a:: 43 47 --all-cpus:: ··· 48 60 be provided as a comma separated list with no space like: 0,1. 49 61 Ranges of CPUs are specified with -: 0-2. 50 62 Default is to trace on all online CPUs. 63 + 64 + -v:: 65 + --verbose:: 66 + Increase the verbosity level. 67 + 68 + 69 + OPTIONS for 'perf ftrace trace' 70 + ------------------------------- 71 + 72 + -t:: 73 + --tracer=:: 74 + Tracer to use when neither -G nor -F option is not 75 + specified: function_graph or function. 76 + 77 + -F:: 78 + --funcs:: 79 + List available functions to trace. It accepts a pattern to 80 + only list interested functions. 81 + 82 + -D:: 83 + --delay:: 84 + Time (ms) to wait before starting tracing after program start. 51 85 52 86 -m:: 53 87 --buffer-size:: ··· 123 113 verbose - Show process names, PIDs, timestamps, etc. 124 114 thresh=<n> - Setup trace duration threshold in microseconds. 125 115 depth=<n> - Set max depth for function graph tracer to follow. 116 + 117 + 118 + OPTIONS for 'perf ftrace latency' 119 + --------------------------------- 120 + 121 + -T:: 122 + --trace-funcs=:: 123 + Set the function name to get the histogram. Unlike perf ftrace trace, 124 + it only allows single function to calculate the histogram. 125 + 126 + -b:: 127 + --use-bpf:: 128 + Use BPF to measure function latency instead of using the ftrace (it 129 + uses function_graph tracer internally). 130 + 131 + -n:: 132 + --use-nsec:: 133 + Use nano-second instead of micro-second as a base unit of the histogram. 134 + 126 135 127 136 SEE ALSO 128 137 --------