Skip to content

Commit

Permalink
tracing: Fix compile issue for trace_sched_wakeup.c
Browse files Browse the repository at this point in the history
The function start_func_tracer() was incorrectly added in the
 #ifdef CONFIG_FUNCTION_TRACER condition, but is still used even
when function tracing is not enabled.

The calls to register_ftrace_function() and register_ftrace_graph()
become nops (and their arguments are even ignored), thus there is
no reason to hide start_func_tracer() when function tracing is
not enabled.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Oct 19, 2010
1 parent 78c89ba commit 7e40798
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/trace/trace_sched_wakeup.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ static struct ftrace_ops trace_ops __read_mostly =
{
.func = wakeup_tracer_call,
};
#endif /* CONFIG_FUNCTION_TRACER */

static int start_func_tracer(int graph)
{
Expand Down Expand Up @@ -159,8 +160,6 @@ static void stop_func_tracer(int graph)
unregister_ftrace_graph();
}

#endif /* CONFIG_FUNCTION_TRACER */

#ifdef CONFIG_FUNCTION_GRAPH_TRACER
static int wakeup_set_flag(u32 old_flags, u32 bit, int set)
{
Expand Down

0 comments on commit 7e40798

Please sign in to comment.