summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_hw_branches.c
diff options
context:
space:
mode:
authorPekka J Enberg2008-12-19 11:08:39 +0100
committerIngo Molnar2008-12-19 16:29:34 +0100
commit213cc060797378059a28ebc5c539f3e9a80160bd (patch)
treee159f9fae35ca59fe2c02e905c2b4b91881d865c /kernel/trace/trace_hw_branches.c
parentMerge branches 'tracing/ftrace', 'tracing/ring-buffer' and 'tracing/urgent' i... (diff)
downloadkernel-qcow2-linux-213cc060797378059a28ebc5c539f3e9a80160bd.tar.gz
kernel-qcow2-linux-213cc060797378059a28ebc5c539f3e9a80160bd.tar.xz
kernel-qcow2-linux-213cc060797378059a28ebc5c539f3e9a80160bd.zip
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_hw_branches.c')
-rw-r--r--kernel/trace/trace_hw_branches.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/kernel/trace/trace_hw_branches.c b/kernel/trace/trace_hw_branches.c
index ee29e012aa97..b6a3e20a49a9 100644
--- a/kernel/trace/trace_hw_branches.c
+++ b/kernel/trace/trace_hw_branches.c
@@ -25,16 +25,6 @@ static DEFINE_PER_CPU(unsigned char[SIZEOF_BTS], buffer);
#define this_buffer per_cpu(buffer, smp_processor_id())
-static void bts_trace_reset(struct trace_array *tr)
-{
- int cpu;
-
- tr->time_start = ftrace_now(tr->cpu);
-
- for_each_online_cpu(cpu)
- tracing_reset(tr, cpu);
-}
-
static void bts_trace_start_cpu(void *arg)
{
if (this_tracer)
@@ -54,7 +44,7 @@ static void bts_trace_start(struct trace_array *tr)
{
int cpu;
- bts_trace_reset(tr);
+ tracing_reset_online_cpus(tr);
for_each_cpu_mask(cpu, cpu_possible_map)
smp_call_function_single(cpu, bts_trace_start_cpu, NULL, 1);
@@ -78,7 +68,7 @@ static void bts_trace_stop(struct trace_array *tr)
static int bts_trace_init(struct trace_array *tr)
{
- bts_trace_reset(tr);
+ tracing_reset_online_cpus(tr);
bts_trace_start(tr);
return 0;