diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-02-05 15:02:00 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-05 19:01:41 -0500 |
commit | b6f11df26fdc28324cf9c9e3b77f2dc985c1bb13 (patch) | |
tree | e03b4b8b9dad8a2d3f81574c10aab8fb7a779cbb /kernel/trace/trace_functions.c | |
parent | 51a763dd84253bab1d0a1e68e11a7753d1b702ca (diff) |
trace: Call tracing_reset_online_cpus before tracer->init()
Impact: cleanup
To make it easy for ftrace plugin writers, as this was open coded in
the existing plugins
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Frédéric Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_functions.c')
-rw-r--r-- | kernel/trace/trace_functions.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c index d067cea2ccc3..36bf9568ccd9 100644 --- a/kernel/trace/trace_functions.c +++ b/kernel/trace/trace_functions.c | |||
@@ -24,32 +24,21 @@ static struct trace_array *func_trace; | |||
24 | static void tracing_start_function_trace(void); | 24 | static void tracing_start_function_trace(void); |
25 | static void tracing_stop_function_trace(void); | 25 | static void tracing_stop_function_trace(void); |
26 | 26 | ||
27 | static void start_function_trace(struct trace_array *tr) | 27 | static int function_trace_init(struct trace_array *tr) |
28 | { | 28 | { |
29 | func_trace = tr; | 29 | func_trace = tr; |
30 | tr->cpu = get_cpu(); | 30 | tr->cpu = get_cpu(); |
31 | tracing_reset_online_cpus(tr); | ||
32 | put_cpu(); | 31 | put_cpu(); |
33 | 32 | ||
34 | tracing_start_cmdline_record(); | 33 | tracing_start_cmdline_record(); |
35 | tracing_start_function_trace(); | 34 | tracing_start_function_trace(); |
36 | } | ||
37 | |||
38 | static void stop_function_trace(struct trace_array *tr) | ||
39 | { | ||
40 | tracing_stop_function_trace(); | ||
41 | tracing_stop_cmdline_record(); | ||
42 | } | ||
43 | |||
44 | static int function_trace_init(struct trace_array *tr) | ||
45 | { | ||
46 | start_function_trace(tr); | ||
47 | return 0; | 35 | return 0; |
48 | } | 36 | } |
49 | 37 | ||
50 | static void function_trace_reset(struct trace_array *tr) | 38 | static void function_trace_reset(struct trace_array *tr) |
51 | { | 39 | { |
52 | stop_function_trace(tr); | 40 | tracing_stop_function_trace(); |
41 | tracing_stop_cmdline_record(); | ||
53 | } | 42 | } |
54 | 43 | ||
55 | static void function_trace_start(struct trace_array *tr) | 44 | static void function_trace_start(struct trace_array *tr) |