diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2008-07-10 20:58:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-11 09:49:18 -0400 |
commit | 001b6767b1d0c89e458e5ddb039245b268f569fb (patch) | |
tree | 51d1135647957f9ad1a513103cdd3cfa11694cda | |
parent | 007c05d4d2ce42fabd58cb54ed98e0a1714d9d86 (diff) |
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>
-rw-r--r-- | kernel/trace/trace.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 6b8bd8800d04..df840f42be39 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -216,8 +216,6 @@ void trace_function(struct trace_array *tr, | |||
216 | unsigned long parent_ip, | 216 | unsigned long parent_ip, |
217 | unsigned long flags); | 217 | unsigned long flags); |
218 | 218 | ||
219 | void tracing_start_function_trace(void); | ||
220 | void tracing_stop_function_trace(void); | ||
221 | void tracing_start_cmdline_record(void); | 219 | void tracing_start_cmdline_record(void); |
222 | void tracing_stop_cmdline_record(void); | 220 | void tracing_stop_cmdline_record(void); |
223 | int register_tracer(struct tracer *type); | 221 | int register_tracer(struct tracer *type); |
@@ -234,6 +232,14 @@ void update_max_tr_single(struct trace_array *tr, | |||
234 | 232 | ||
235 | extern cycle_t ftrace_now(int cpu); | 233 | extern cycle_t ftrace_now(int cpu); |
236 | 234 | ||
235 | #ifdef CONFIG_FTRACE | ||
236 | void tracing_start_function_trace(void); | ||
237 | void tracing_stop_function_trace(void); | ||
238 | #else | ||
239 | # define tracing_start_function_trace() do { } while (0) | ||
240 | # define tracing_stop_function_trace() do { } while (0) | ||
241 | #endif | ||
242 | |||
237 | #ifdef CONFIG_CONTEXT_SWITCH_TRACER | 243 | #ifdef CONFIG_CONTEXT_SWITCH_TRACER |
238 | typedef void | 244 | typedef void |
239 | (*tracer_switch_func_t)(void *private, | 245 | (*tracer_switch_func_t)(void *private, |