aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_power.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-09-04 12:12:39 -0400
committerSteven Rostedt <rostedt@goodmis.org>2009-09-04 12:12:39 -0400
commit76f0d07376388f32698ba51b6090a26b90c1342f (patch)
treeea3a2576e7d2ae85d610aa088cb05986a13f03b1 /kernel/trace/trace_power.c
parent621968cdb2563b667d6ecb484ba91ef4c3a797b3 (diff)
tracing: remove users of tracing_reset
The function tracing_reset is deprecated for outside use of trace.c. The new function to reset the the buffers is tracing_reset_online_cpus. The reason for this is that resetting the buffers while the event trace points are active can corrupt the buffers, because they may be writing at the time of reset. The tracing_reset_online_cpus disables writes and waits for current writers to finish. This patch replaces all users of tracing_reset except for the latency tracers. Those changes require more work and will be removed in the following patches. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_power.c')
-rw-r--r--kernel/trace/trace_power.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/trace/trace_power.c b/kernel/trace/trace_power.c
index 8a30d9874cd4..a5d5a4f7745b 100644
--- a/kernel/trace/trace_power.c
+++ b/kernel/trace/trace_power.c
@@ -144,14 +144,12 @@ static void power_trace_reset(struct trace_array *tr)
144 144
145static int power_trace_init(struct trace_array *tr) 145static int power_trace_init(struct trace_array *tr)
146{ 146{
147 int cpu;
148 power_trace = tr; 147 power_trace = tr;
149 148
150 trace_power_enabled = 1; 149 trace_power_enabled = 1;
151 tracing_power_register(); 150 tracing_power_register();
152 151
153 for_each_cpu(cpu, cpu_possible_mask) 152 tracing_reset_online_cpus(tr);
154 tracing_reset(tr, cpu);
155 return 0; 153 return 0;
156} 154}
157 155