diff options
author | Pekka J Enberg <penberg@cs.helsinki.fi> | 2008-12-19 05:08:39 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-19 10:29:34 -0500 |
commit | 213cc060797378059a28ebc5c539f3e9a80160bd (patch) | |
tree | e159f9fae35ca59fe2c02e905c2b4b91881d865c /kernel/trace/trace_sysprof.c | |
parent | 30cd324e9787ccc9a5ede59742d5409857550692 (diff) |
ftrace: introduce tracing_reset_online_cpus() helper
Impact: cleanup
This patch factors out common code from multiple tracers into a
tracing_reset_online_cpus() function and converts the tracers to use it.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_sysprof.c')
-rw-r--r-- | kernel/trace/trace_sysprof.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/kernel/trace/trace_sysprof.c b/kernel/trace/trace_sysprof.c index 54960edb96d0..01becf1f19ff 100644 --- a/kernel/trace/trace_sysprof.c +++ b/kernel/trace/trace_sysprof.c | |||
@@ -234,20 +234,10 @@ static void stop_stack_timers(void) | |||
234 | stop_stack_timer(cpu); | 234 | stop_stack_timer(cpu); |
235 | } | 235 | } |
236 | 236 | ||
237 | static void stack_reset(struct trace_array *tr) | ||
238 | { | ||
239 | int cpu; | ||
240 | |||
241 | tr->time_start = ftrace_now(tr->cpu); | ||
242 | |||
243 | for_each_online_cpu(cpu) | ||
244 | tracing_reset(tr, cpu); | ||
245 | } | ||
246 | |||
247 | static void start_stack_trace(struct trace_array *tr) | 237 | static void start_stack_trace(struct trace_array *tr) |
248 | { | 238 | { |
249 | mutex_lock(&sample_timer_lock); | 239 | mutex_lock(&sample_timer_lock); |
250 | stack_reset(tr); | 240 | tracing_reset_online_cpus(tr); |
251 | start_stack_timers(); | 241 | start_stack_timers(); |
252 | tracer_enabled = 1; | 242 | tracer_enabled = 1; |
253 | mutex_unlock(&sample_timer_lock); | 243 | mutex_unlock(&sample_timer_lock); |