diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-01-15 23:06:03 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-16 06:17:58 -0500 |
commit | a225cdd263f340c864febb1992802fb5b08bc328 (patch) | |
tree | a457f609c0071216c37f255cbaba00217bf1a7ed | |
parent | 3eb36aa05329a47cbe201c151fd0024a4a3649cd (diff) |
ftrace: remove static from function tracer functions
Impact: clean up
After reorganizing the functions in trace.c and trace_function.c,
they no longer need to be in global context. This patch makes the
functions and one variable into static.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | kernel/trace/trace.c | 3 | ||||
-rw-r--r-- | kernel/trace/trace.h | 10 | ||||
-rw-r--r-- | kernel/trace/trace_functions.c | 10 |
3 files changed, 8 insertions, 15 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 2585ffb6c6b5..7de6a94063dd 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -187,9 +187,6 @@ int tracing_is_enabled(void) | |||
187 | return tracer_enabled; | 187 | return tracer_enabled; |
188 | } | 188 | } |
189 | 189 | ||
190 | /* function tracing enabled */ | ||
191 | int ftrace_function_enabled; | ||
192 | |||
193 | /* | 190 | /* |
194 | * trace_buf_size is the size in bytes that is allocated | 191 | * trace_buf_size is the size in bytes that is allocated |
195 | * for a buffer. Note, the number of bytes is always rounded | 192 | * for a buffer. Note, the number of bytes is always rounded |
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index bf39a369e4b3..54b72781e920 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -464,16 +464,6 @@ void __trace_stack(struct trace_array *tr, | |||
464 | 464 | ||
465 | extern cycle_t ftrace_now(int cpu); | 465 | extern cycle_t ftrace_now(int cpu); |
466 | 466 | ||
467 | #ifdef CONFIG_FUNCTION_TRACER | ||
468 | void tracing_start_function_trace(void); | ||
469 | void tracing_stop_function_trace(void); | ||
470 | #else | ||
471 | # define tracing_start_function_trace() do { } while (0) | ||
472 | # define tracing_stop_function_trace() do { } while (0) | ||
473 | #endif | ||
474 | |||
475 | extern int ftrace_function_enabled; | ||
476 | |||
477 | #ifdef CONFIG_CONTEXT_SWITCH_TRACER | 467 | #ifdef CONFIG_CONTEXT_SWITCH_TRACER |
478 | typedef void | 468 | typedef void |
479 | (*tracer_switch_func_t)(void *private, | 469 | (*tracer_switch_func_t)(void *private, |
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c index 61d0b73dabf5..b3a320f8aba7 100644 --- a/kernel/trace/trace_functions.c +++ b/kernel/trace/trace_functions.c | |||
@@ -16,8 +16,14 @@ | |||
16 | 16 | ||
17 | #include "trace.h" | 17 | #include "trace.h" |
18 | 18 | ||
19 | /* function tracing enabled */ | ||
20 | static int ftrace_function_enabled; | ||
21 | |||
19 | static struct trace_array *func_trace; | 22 | static struct trace_array *func_trace; |
20 | 23 | ||
24 | static void tracing_start_function_trace(void); | ||
25 | static void tracing_stop_function_trace(void); | ||
26 | |||
21 | static void start_function_trace(struct trace_array *tr) | 27 | static void start_function_trace(struct trace_array *tr) |
22 | { | 28 | { |
23 | func_trace = tr; | 29 | func_trace = tr; |
@@ -177,7 +183,7 @@ static struct tracer_flags func_flags = { | |||
177 | .opts = func_opts | 183 | .opts = func_opts |
178 | }; | 184 | }; |
179 | 185 | ||
180 | void tracing_start_function_trace(void) | 186 | static void tracing_start_function_trace(void) |
181 | { | 187 | { |
182 | ftrace_function_enabled = 0; | 188 | ftrace_function_enabled = 0; |
183 | 189 | ||
@@ -194,7 +200,7 @@ void tracing_start_function_trace(void) | |||
194 | ftrace_function_enabled = 1; | 200 | ftrace_function_enabled = 1; |
195 | } | 201 | } |
196 | 202 | ||
197 | void tracing_stop_function_trace(void) | 203 | static void tracing_stop_function_trace(void) |
198 | { | 204 | { |
199 | ftrace_function_enabled = 0; | 205 | ftrace_function_enabled = 0; |
200 | /* OK if they are not registered */ | 206 | /* OK if they are not registered */ |