summaryrefslogtreecommitdiff
path: root/kernel/trace/trace_hw_branches.c
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2009-01-19 10:33:31 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-20 13:03:55 +0100
commite23b8ad83430a6fdfbdbfac365f5b0312dd57f10 (patch)
tree3a3d623f800880dfc37a12ddb35a9887dacb98fe /kernel/trace/trace_hw_branches.c
parentb1818748b0cf9427e48acf9713295e829a0d715f (diff)
x86, ftrace, hw-branch-tracer: reset trace buffer on close
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>
Diffstat (limited to 'kernel/trace/trace_hw_branches.c')
-rw-r--r--kernel/trace/trace_hw_branches.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/trace/trace_hw_branches.c b/kernel/trace/trace_hw_branches.c
index e56df2c7d679..372b47ac3154 100644
--- a/kernel/trace/trace_hw_branches.c
+++ b/kernel/trace/trace_hw_branches.c
@@ -274,6 +274,11 @@ static void trace_bts_prepare(struct trace_iterator *iter)
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);
@@ -292,7 +297,8 @@ struct tracer bts_tracer __read_mostly =
.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)