aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorPekka J Enberg <penberg@cs.helsinki.fi>2008-12-19 05:08:39 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-19 10:29:34 -0500
commit213cc060797378059a28ebc5c539f3e9a80160bd (patch)
treee159f9fae35ca59fe2c02e905c2b4b91881d865c /kernel/trace/trace.c
parent30cd324e9787ccc9a5ede59742d5409857550692 (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.c')
-rw-r--r--kernel/trace/trace.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 0eb6d48347f7..79db26e8216e 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -679,6 +679,16 @@ void tracing_reset(struct trace_array *tr, int cpu)
679 ftrace_enable_cpu(); 679 ftrace_enable_cpu();
680} 680}
681 681
682void tracing_reset_online_cpus(struct trace_array *tr)
683{
684 int cpu;
685
686 tr->time_start = ftrace_now(tr->cpu);
687
688 for_each_online_cpu(cpu)
689 tracing_reset(tr, cpu);
690}
691
682#define SAVED_CMDLINES 128 692#define SAVED_CMDLINES 128
683static unsigned map_pid_to_cmdline[PID_MAX_DEFAULT+1]; 693static unsigned map_pid_to_cmdline[PID_MAX_DEFAULT+1];
684static unsigned map_cmdline_to_pid[SAVED_CMDLINES]; 694static unsigned map_cmdline_to_pid[SAVED_CMDLINES];