diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-11-23 13:06:07 -0500 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-12-08 20:54:06 -0500 |
commit | c8dd0f45874547e6e77bab03d71feb16c4cb98a8 (patch) | |
tree | 8f21cbbe70a8ab021f793cefa8f1045721809338 /kernel/trace/trace_functions_graph.c | |
parent | 3306fc4aff464f9c08c8899695a218f4b1125d4a (diff) |
function_graph: Do not expose the graph_time option when profiler is not configured
When the function profiler is not configured, the "graph_time" option is
meaningless, as the function profiler is the only thing that makes use of
it. Do not expose it if the profiler is not configured.
Link: http://lkml.kernel.org/r/20181123061133.GA195223@google.com
Reported-by: Joel Fernandes <joel@joelfernandes.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_functions_graph.c')
-rw-r--r-- | kernel/trace/trace_functions_graph.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index eaf9b1629956..855c13c61e77 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c | |||
@@ -60,8 +60,12 @@ static struct tracer_opt trace_opts[] = { | |||
60 | { TRACER_OPT(funcgraph-tail, TRACE_GRAPH_PRINT_TAIL) }, | 60 | { TRACER_OPT(funcgraph-tail, TRACE_GRAPH_PRINT_TAIL) }, |
61 | /* Include sleep time (scheduled out) between entry and return */ | 61 | /* Include sleep time (scheduled out) between entry and return */ |
62 | { TRACER_OPT(sleep-time, TRACE_GRAPH_SLEEP_TIME) }, | 62 | { TRACER_OPT(sleep-time, TRACE_GRAPH_SLEEP_TIME) }, |
63 | |||
64 | #ifdef CONFIG_FUNCTION_PROFILER | ||
63 | /* Include time within nested functions */ | 65 | /* Include time within nested functions */ |
64 | { TRACER_OPT(graph-time, TRACE_GRAPH_GRAPH_TIME) }, | 66 | { TRACER_OPT(graph-time, TRACE_GRAPH_GRAPH_TIME) }, |
67 | #endif | ||
68 | |||
65 | { } /* Empty entry */ | 69 | { } /* Empty entry */ |
66 | }; | 70 | }; |
67 | 71 | ||