lkml.org 
[lkml]   [2008]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/8] 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>
---
kernel/trace/trace.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

Index: linux-tip.git/kernel/trace/trace.h
===================================================================
--- linux-tip.git.orig/kernel/trace/trace.h 2008-06-26 14:58:55.000000000 -0400
+++ linux-tip.git/kernel/trace/trace.h 2008-06-30 22:39:15.000000000 -0400
@@ -216,8 +216,6 @@ void trace_function(struct trace_array *
unsigned long parent_ip,
unsigned long flags);

-void tracing_start_function_trace(void);
-void tracing_stop_function_trace(void);
void tracing_start_cmdline_record(void);
void tracing_stop_cmdline_record(void);
int register_tracer(struct tracer *type);
@@ -234,6 +232,14 @@ void update_max_tr_single(struct trace_a

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
typedef void
(*tracer_switch_func_t)(void *private,
--


\
 
 \ /
  Last update: 2008-07-11 03:09    [W:0.069 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site