From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Markus Metzger <markus.t.metzger@intel.com>,
Steven Rostedt <srostedt@redhat.com>
Subject: [PATCH 3/8] x86, ftrace, hw-branch-tracer: reset trace buffer on close
Date: Mon, 19 Jan 2009 19:15:45 -0500 [thread overview]
Message-ID: <20090120001732.732175373@goodmis.org> (raw)
In-Reply-To: 20090120001542.687427797@goodmis.org
[-- Attachment #1: 0003-x86-ftrace-hw-branch-tracer-reset-trace-buffer-on.patch --]
[-- Type: text/plain, Size: 1156 bytes --]
From: Markus Metzger <markus.t.metzger@intel.com>
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>
---
kernel/trace/trace_hw_branches.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_hw_branches.c b/kernel/trace/trace_hw_branches.c
index e56df2c..372b47a 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)
--
1.5.6.5
--
next prev parent reply other threads:[~2009-01-20 0:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-20 0:15 [PATCH 0/8] ftrace: updates to tip Steven Rostedt
2009-01-20 0:15 ` [PATCH 1/8] x86, ftrace, hw-branch-tracer: support hotplug cpus Steven Rostedt
2009-01-20 0:15 ` [PATCH 2/8] x86, ftrace, hw-branch-tracer: dump trace on oops Steven Rostedt
2009-01-20 0:15 ` Steven Rostedt [this message]
2009-01-20 0:15 ` [PATCH 4/8] x86, ftrace, hw-branch-tracer: change trace format Steven Rostedt
2009-01-20 0:15 ` [PATCH 5/8] x86, ftrace, hw-branch-tracer: documentation Steven Rostedt
2009-01-20 0:15 ` [PATCH 6/8] x86, ds, bts: cleanup DS configuration Steven Rostedt
2009-01-20 0:15 ` [PATCH 7/8] ring-buffer: fix alignment problem Steven Rostedt
2009-01-20 0:15 ` [PATCH 8/8] trace_workqueue: use percpu data for workqueue stat Steven Rostedt
2009-01-20 0:41 ` [PATCH 0/8] ftrace: updates to tip Steven Rostedt
2009-01-20 0:42 ` Steven Rostedt
2009-01-20 12:05 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090120001732.732175373@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.t.metzger@intel.com \
--cc=mingo@elte.hu \
--cc=srostedt@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox