Reset the ftrace buffer on close. Since we use cyclic buffers, the
trace is not contiguous, anyway.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
        mutex_unlock(&bts_tracer_mutex);
 }
 
+static void trace_bts_close(struct trace_iterator *iter)
+{
+       tracing_reset_online_cpus(iter->tr);
+}
+
 void trace_hw_branch_oops(void)
 {
        mutex_lock(&bts_tracer_mutex);
        .print_line     = bts_trace_print_line,
        .start          = bts_trace_start,
        .stop           = bts_trace_stop,
-       .open           = trace_bts_prepare
+       .open           = trace_bts_prepare,
+       .close          = trace_bts_close
 };
 
 __init static int init_bts_trace(void)