Browse Source

ftrace: define function trace nop

When CONFIG_FTRACE is not enabled, the tracing_start_functon_trace
and tracing_stop_function_trace should be nops.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Cc: Steven Rostedt <srostedt@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt 17 years ago
parent
commit
001b6767b1
1 changed files with 8 additions and 2 deletions
  1. 8 2
      kernel/trace/trace.h

+ 8 - 2
kernel/trace/trace.h

@@ -216,8 +216,6 @@ void trace_function(struct trace_array *tr,
 		    unsigned long parent_ip,
 		    unsigned long parent_ip,
 		    unsigned long flags);
 		    unsigned long flags);
 
 
-void tracing_start_function_trace(void);
-void tracing_stop_function_trace(void);
 void tracing_start_cmdline_record(void);
 void tracing_start_cmdline_record(void);
 void tracing_stop_cmdline_record(void);
 void tracing_stop_cmdline_record(void);
 int register_tracer(struct tracer *type);
 int register_tracer(struct tracer *type);
@@ -234,6 +232,14 @@ void update_max_tr_single(struct trace_array *tr,
 
 
 extern cycle_t ftrace_now(int cpu);
 extern cycle_t ftrace_now(int cpu);
 
 
+#ifdef CONFIG_FTRACE
+void tracing_start_function_trace(void);
+void tracing_stop_function_trace(void);
+#else
+# define tracing_start_function_trace()		do { } while (0)
+# define tracing_stop_function_trace()		do { } while (0)
+#endif
+
 #ifdef CONFIG_CONTEXT_SWITCH_TRACER
 #ifdef CONFIG_CONTEXT_SWITCH_TRACER
 typedef void
 typedef void
 (*tracer_switch_func_t)(void *private,
 (*tracer_switch_func_t)(void *private,