diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-01-28 10:02:12 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-29 08:28:31 -0500 |
commit | f04109bf1be7449e27d38ae1bb8465013374bd49 (patch) | |
tree | 60c320ee6393a522910252f5e3c7294e3a739bfd /kernel | |
parent | 700a3dcb9036d17d3a67d0a7ceee9d4373fbb570 (diff) |
trace: Use tracing_reset_online_cpus in more places
Impact: cleanup
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')
-rw-r--r-- | kernel/trace/trace_branch.c | 6 | ||||
-rw-r--r-- | kernel/trace/trace_functions_graph.c | 8 | ||||
-rw-r--r-- | kernel/trace/trace_nop.c | 6 |
3 files changed, 4 insertions, 16 deletions
diff --git a/kernel/trace/trace_branch.c b/kernel/trace/trace_branch.c index ca017e0a9a27..1284145c8898 100644 --- a/kernel/trace/trace_branch.c +++ b/kernel/trace/trace_branch.c | |||
@@ -133,11 +133,7 @@ static void stop_branch_trace(struct trace_array *tr) | |||
133 | 133 | ||
134 | static int branch_trace_init(struct trace_array *tr) | 134 | static int branch_trace_init(struct trace_array *tr) |
135 | { | 135 | { |
136 | int cpu; | 136 | tracing_reset_online_cpus(tr); |
137 | |||
138 | for_each_online_cpu(cpu) | ||
139 | tracing_reset(tr, cpu); | ||
140 | |||
141 | start_branch_trace(tr); | 137 | start_branch_trace(tr); |
142 | return 0; | 138 | return 0; |
143 | } | 139 | } |
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index 66fc7b806a38..c97594d826bc 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c | |||
@@ -52,15 +52,11 @@ static struct tracer_flags tracer_flags = { | |||
52 | 52 | ||
53 | static int graph_trace_init(struct trace_array *tr) | 53 | static int graph_trace_init(struct trace_array *tr) |
54 | { | 54 | { |
55 | int cpu, ret; | 55 | int ret = register_ftrace_graph(&trace_graph_return, |
56 | |||
57 | for_each_online_cpu(cpu) | ||
58 | tracing_reset(tr, cpu); | ||
59 | |||
60 | ret = register_ftrace_graph(&trace_graph_return, | ||
61 | &trace_graph_entry); | 56 | &trace_graph_entry); |
62 | if (ret) | 57 | if (ret) |
63 | return ret; | 58 | return ret; |
59 | tracing_reset_online_cpus(tr); | ||
64 | tracing_start_cmdline_record(); | 60 | tracing_start_cmdline_record(); |
65 | 61 | ||
66 | return 0; | 62 | return 0; |
diff --git a/kernel/trace/trace_nop.c b/kernel/trace/trace_nop.c index b9767acd30ac..087b6cbf4ea5 100644 --- a/kernel/trace/trace_nop.c +++ b/kernel/trace/trace_nop.c | |||
@@ -47,12 +47,8 @@ static void stop_nop_trace(struct trace_array *tr) | |||
47 | 47 | ||
48 | static int nop_trace_init(struct trace_array *tr) | 48 | static int nop_trace_init(struct trace_array *tr) |
49 | { | 49 | { |
50 | int cpu; | ||
51 | ctx_trace = tr; | 50 | ctx_trace = tr; |
52 | 51 | tracing_reset_online_cpus(tr); | |
53 | for_each_online_cpu(cpu) | ||
54 | tracing_reset(tr, cpu); | ||
55 | |||
56 | start_nop_trace(tr); | 52 | start_nop_trace(tr); |
57 | return 0; | 53 | return 0; |
58 | } | 54 | } |