summaryrefslogtreecommitdiff
path: root/kernel/trace/trace_sched_wakeup.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2015-09-29 10:15:10 -0400
committerSteven Rostedt <rostedt@goodmis.org>2015-09-29 13:23:58 -0400
commit729358da95a1b3850ef892e9384f58932da1dc69 (patch)
treed7d4ad01b17ed7490e9689d1eb79396b9dbb7099 /kernel/trace/trace_sched_wakeup.c
parenta3418a364ec3c8f0c29bf3f4cfc71dc6f240150e (diff)
tracing: Only create function graph options when it is compiled in
Do not create fuction graph tracer options when function graph tracer is not even compiled in. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_sched_wakeup.c')
-rw-r--r--kernel/trace/trace_sched_wakeup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/trace/trace_sched_wakeup.c b/kernel/trace/trace_sched_wakeup.c
index f5d2e65e7c92..a6c350c681cc 100644
--- a/kernel/trace/trace_sched_wakeup.c
+++ b/kernel/trace/trace_sched_wakeup.c
@@ -40,15 +40,15 @@ static void wakeup_graph_return(struct ftrace_graph_ret *trace);
static int save_flags;
static bool function_enabled;
-#define is_graph() (trace_flags & TRACE_ITER_DISPLAY_GRAPH)
-
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
static int wakeup_display_graph(struct trace_array *tr, int set);
+# define is_graph() (trace_flags & TRACE_ITER_DISPLAY_GRAPH)
#else
static inline int wakeup_display_graph(struct trace_array *tr, int set)
{
return -EINVAL;
}
+# define is_graph() false
#endif
@@ -174,8 +174,10 @@ static int wakeup_flag_changed(struct trace_array *tr, u32 mask, int set)
if (mask & TRACE_ITER_FUNCTION)
return wakeup_function_set(tr, set);
+#ifdef CONFIG_FUNCTION_GRAPH_TRACER
if (mask & TRACE_ITER_DISPLAY_GRAPH)
return wakeup_display_graph(tr, set);
+#endif
return trace_keep_overwrite(tracer, mask, set);
}