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 <changbin.du@gmail.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Link: http://lore.kernel.org/lkml/20200808023141.14227-15-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
00c85d5f45
commit
a8f87a5cb4
@ -98,16 +98,13 @@ OPTIONS
|
|||||||
specify multiple functions. It will be passed to 'set_graph_notrace'
|
specify multiple functions. It will be passed to 'set_graph_notrace'
|
||||||
in tracefs.
|
in tracefs.
|
||||||
|
|
||||||
-D::
|
|
||||||
--graph-depth=::
|
|
||||||
Set max depth for function graph tracer to follow
|
|
||||||
|
|
||||||
--graph-opts::
|
--graph-opts::
|
||||||
List of options allowed to set:
|
List of options allowed to set:
|
||||||
nosleep-time - Measure on-CPU time only for function_graph tracer.
|
nosleep-time - Measure on-CPU time only for function_graph tracer.
|
||||||
noirqs - Ignore functions that happen inside interrupt.
|
noirqs - Ignore functions that happen inside interrupt.
|
||||||
verbose - Show process names, PIDs, timestamps, etc.
|
verbose - Show process names, PIDs, timestamps, etc.
|
||||||
thresh=<n> - Setup trace duration threshold in microseconds.
|
thresh=<n> - Setup trace duration threshold in microseconds.
|
||||||
|
depth=<n> - Set max depth for function graph tracer to follow.
|
||||||
|
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
--------
|
--------
|
||||||
|
@ -751,6 +751,7 @@ static int parse_graph_tracer_opts(const struct option *opt,
|
|||||||
{ .name = "noirqs", .value_ptr = &ftrace->graph_noirqs },
|
{ .name = "noirqs", .value_ptr = &ftrace->graph_noirqs },
|
||||||
{ .name = "verbose", .value_ptr = &ftrace->graph_verbose },
|
{ .name = "verbose", .value_ptr = &ftrace->graph_verbose },
|
||||||
{ .name = "thresh", .value_ptr = &ftrace->graph_thresh },
|
{ .name = "thresh", .value_ptr = &ftrace->graph_thresh },
|
||||||
|
{ .name = "depth", .value_ptr = &ftrace->graph_depth },
|
||||||
{ .name = NULL, }
|
{ .name = NULL, }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -819,10 +820,8 @@ int cmd_ftrace(int argc, const char **argv)
|
|||||||
parse_filter_func),
|
parse_filter_func),
|
||||||
OPT_CALLBACK('g', "nograph-funcs", &ftrace.nograph_funcs, "func",
|
OPT_CALLBACK('g', "nograph-funcs", &ftrace.nograph_funcs, "func",
|
||||||
"Set nograph filter on given functions", parse_filter_func),
|
"Set nograph filter on given functions", parse_filter_func),
|
||||||
OPT_INTEGER('D', "graph-depth", &ftrace.graph_depth,
|
|
||||||
"Max depth for function graph tracer"),
|
|
||||||
OPT_CALLBACK(0, "graph-opts", &ftrace, "options",
|
OPT_CALLBACK(0, "graph-opts", &ftrace, "options",
|
||||||
"graph tracer options, available options: nosleep-time,noirqs,verbose,thresh=<n>",
|
"graph tracer options, available options: nosleep-time,noirqs,verbose,thresh=<n>,depth=<n>",
|
||||||
parse_graph_tracer_opts),
|
parse_graph_tracer_opts),
|
||||||
OPT_CALLBACK('m', "buffer-size", &ftrace.percpu_buffer_size, "size",
|
OPT_CALLBACK('m', "buffer-size", &ftrace.percpu_buffer_size, "size",
|
||||||
"size of per cpu buffer", parse_buffer_size),
|
"size of per cpu buffer", parse_buffer_size),
|
||||||
|
Loading…
Reference in New Issue
Block a user