Skip to content

Commit feff083

Browse files
namhyungacmel
authored andcommitted
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>
1 parent 84005bb commit feff083

1 file changed

Lines changed: 52 additions & 23 deletions

File tree

tools/perf/Documentation/perf-ftrace.txt

Lines changed: 52 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,24 @@ perf-ftrace - simple wrapper for kernel's ftrace functionality
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'perf ftrace' <command>
12+
'perf ftrace' {trace|latency} <command>
1313

1414
DESCRIPTION
1515
-----------
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.
1918

20-
The following options apply to perf ftrace.
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.
2122

22-
OPTIONS
23-
-------
23+
'perf ftrace latency' calculates execution latency of a given function
24+
(optionally with BPF) and display it as a histogram.
2425

25-
-t::
26-
--tracer=::
27-
Tracer to use when neither -G nor -F option is not
28-
specified: function_graph or function.
26+
The following options apply to perf ftrace.
2927

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+
--------------
3830

3931
-p::
4032
--pid=::
@@ -43,10 +35,6 @@ OPTIONS
4335
--tid=::
4436
Trace on existing thread id (comma separated list).
4537

46-
-D::
47-
--delay::
48-
Time (ms) to wait before starting tracing after program start.
49-
5038
-a::
5139
--all-cpus::
5240
Force system-wide collection. Scripts run without a <command>
@@ -61,6 +49,28 @@ OPTIONS
6149
Ranges of CPUs are specified with -: 0-2.
6250
Default is to trace on all online CPUs.
6351

52+
-v::
53+
--verbose::
54+
Increase the verbosity level.
55+
56+
57+
OPTIONS for 'perf ftrace trace'
58+
-------------------------------
59+
60+
-t::
61+
--tracer=::
62+
Tracer to use when neither -G nor -F option is not
63+
specified: function_graph or function.
64+
65+
-F::
66+
--funcs::
67+
List available functions to trace. It accepts a pattern to
68+
only list interested functions.
69+
70+
-D::
71+
--delay::
72+
Time (ms) to wait before starting tracing after program start.
73+
6474
-m::
6575
--buffer-size::
6676
Set the size of per-cpu tracing buffer, <size> is expected to
@@ -114,6 +124,25 @@ OPTIONS
114124
thresh=<n> - Setup trace duration threshold in microseconds.
115125
depth=<n> - Set max depth for function graph tracer to follow.
116126

127+
128+
OPTIONS for 'perf ftrace latency'
129+
---------------------------------
130+
131+
-T::
132+
--trace-funcs=::
133+
Set the function name to get the histogram. Unlike perf ftrace trace,
134+
it only allows single function to calculate the histogram.
135+
136+
-b::
137+
--use-bpf::
138+
Use BPF to measure function latency instead of using the ftrace (it
139+
uses function_graph tracer internally).
140+
141+
-n::
142+
--use-nsec::
143+
Use nano-second instead of micro-second as a base unit of the histogram.
144+
145+
117146
SEE ALSO
118147
--------
119148
linkperf:perf-record[1], linkperf:perf-trace[1]

0 commit comments

Comments
 (0)