Skip to content

Commit a8f87a5

Browse files
changbinduacmel
authored andcommitted
perf: ftrace: Allow set graph depth by '--graph-opts'
This is to have a consistent view of all graph tracer options. The original option '--graph-depth' is marked as deprecated. Signed-off-by: Changbin Du <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steven Rostedt (VMware) <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 00c85d5 commit a8f87a5

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

tools/perf/Documentation/perf-ftrace.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,13 @@ OPTIONS
9898
specify multiple functions. It will be passed to 'set_graph_notrace'
9999
in tracefs.
100100

101-
-D::
102-
--graph-depth=::
103-
Set max depth for function graph tracer to follow
104-
105101
--graph-opts::
106102
List of options allowed to set:
107103
nosleep-time - Measure on-CPU time only for function_graph tracer.
108104
noirqs - Ignore functions that happen inside interrupt.
109105
verbose - Show process names, PIDs, timestamps, etc.
110106
thresh=<n> - Setup trace duration threshold in microseconds.
107+
depth=<n> - Set max depth for function graph tracer to follow.
111108

112109
SEE ALSO
113110
--------

tools/perf/builtin-ftrace.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,7 @@ static int parse_graph_tracer_opts(const struct option *opt,
751751
{ .name = "noirqs", .value_ptr = &ftrace->graph_noirqs },
752752
{ .name = "verbose", .value_ptr = &ftrace->graph_verbose },
753753
{ .name = "thresh", .value_ptr = &ftrace->graph_thresh },
754+
{ .name = "depth", .value_ptr = &ftrace->graph_depth },
754755
{ .name = NULL, }
755756
};
756757

@@ -819,10 +820,8 @@ int cmd_ftrace(int argc, const char **argv)
819820
parse_filter_func),
820821
OPT_CALLBACK('g', "nograph-funcs", &ftrace.nograph_funcs, "func",
821822
"Set nograph filter on given functions", parse_filter_func),
822-
OPT_INTEGER('D', "graph-depth", &ftrace.graph_depth,
823-
"Max depth for function graph tracer"),
824823
OPT_CALLBACK(0, "graph-opts", &ftrace, "options",
825-
"graph tracer options, available options: nosleep-time,noirqs,verbose,thresh=<n>",
824+
"graph tracer options, available options: nosleep-time,noirqs,verbose,thresh=<n>,depth=<n>",
826825
parse_graph_tracer_opts),
827826
OPT_CALLBACK('m', "buffer-size", &ftrace.percpu_buffer_size, "size",
828827
"size of per cpu buffer", parse_buffer_size),

0 commit comments

Comments
 (0)