ftrace_enable_cpu();
 }
 
+void tracing_reset_online_cpus(struct trace_array *tr)
+{
+       int cpu;
+
+       tr->time_start = ftrace_now(tr->cpu);
+
+       for_each_online_cpu(cpu)
+               tracing_reset(tr, cpu);
+}
+
 #define SAVED_CMDLINES 128
 static unsigned map_pid_to_cmdline[PID_MAX_DEFAULT+1];
 static unsigned map_cmdline_to_pid[SAVED_CMDLINES];
 
 int tracing_is_enabled(void);
 void trace_wake_up(void);
 void tracing_reset(struct trace_array *tr, int cpu);
+void tracing_reset_online_cpus(struct trace_array *tr);
 int tracing_open_generic(struct inode *inode, struct file *filp);
 struct dentry *tracing_init_dentry(void);
 void init_tracer_sysprof_debugfs(struct dentry *d_tracer);
 
                tracing_stop_sched_switch_record();
 }
 
-static void reset_boot_trace(struct trace_array *tr)
-{
-       int cpu;
-
-       tr->time_start = ftrace_now(tr->cpu);
-
-       for_each_online_cpu(cpu)
-               tracing_reset(tr, cpu);
-}
-
 static int boot_trace_init(struct trace_array *tr)
 {
        int cpu;
 {
        .name           = "initcall",
        .init           = boot_trace_init,
-       .reset          = reset_boot_trace,
+       .reset          = tracing_reset_online_cpus,
        .print_line     = initcall_print_line,
 };
 
 
 
 #include "trace.h"
 
-static void function_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 start_function_trace(struct trace_array *tr)
 {
        tr->cpu = get_cpu();
-       function_reset(tr);
+       tracing_reset_online_cpus(tr);
        put_cpu();
 
        tracing_start_cmdline_record();
 
 static void function_trace_start(struct trace_array *tr)
 {
-       function_reset(tr);
+       tracing_reset_online_cpus(tr);
 }
 
 static struct tracer function_trace __read_mostly =
 
 #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)
 {
        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);
 
 static int bts_trace_init(struct trace_array *tr)
 {
-       bts_trace_reset(tr);
+       tracing_reset_online_cpus(tr);
        bts_trace_start(tr);
 
        return 0;
 
 
 static void mmio_reset_data(struct trace_array *tr)
 {
-       int cpu;
-
        overrun_detected = false;
        prev_overruns = 0;
-       tr->time_start = ftrace_now(tr->cpu);
 
-       for_each_online_cpu(cpu)
-               tracing_reset(tr, cpu);
+       tracing_reset_online_cpus(tr);
 }
 
 static int mmio_trace_init(struct trace_array *tr)
 
        local_irq_restore(flags);
 }
 
-static void sched_switch_reset(struct trace_array *tr)
-{
-       int cpu;
-
-       tr->time_start = ftrace_now(tr->cpu);
-
-       for_each_online_cpu(cpu)
-               tracing_reset(tr, cpu);
-}
-
 static int tracing_sched_register(void)
 {
        int ret;
 
 static void start_sched_trace(struct trace_array *tr)
 {
-       sched_switch_reset(tr);
+       tracing_reset_online_cpus(tr);
        tracing_start_sched_switch_record();
 }
 
 
 static void sched_switch_trace_start(struct trace_array *tr)
 {
-       sched_switch_reset(tr);
+       tracing_reset_online_cpus(tr);
        tracing_start_sched_switch();
 }
 
 
                stop_stack_timer(cpu);
 }
 
-static void stack_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 start_stack_trace(struct trace_array *tr)
 {
        mutex_lock(&sample_timer_lock);
-       stack_reset(tr);
+       tracing_reset_online_cpus(tr);
        start_stack_timers();
        tracer_enabled = 1;
        mutex_unlock(&sample_timer_lock);