From: "tip-bot for markus.t.metzger@intel.com" <markus.t.metzger@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
markus.t.metzger@intel.com, a.p.zjilstra@chello.nl,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perfcounters/core] x86, perf_counter, bts: Do not allow kernel BTS tracing for now
Date: Fri, 4 Sep 2009 07:58:44 GMT [thread overview]
Message-ID: <tip-1653192f510bd8114b7b133d7289e6e5c3e95046@git.kernel.org> (raw)
In-Reply-To: <20090902140616.901253000@intel.com>
Commit-ID: 1653192f510bd8114b7b133d7289e6e5c3e95046
Gitweb: http://git.kernel.org/tip/1653192f510bd8114b7b133d7289e6e5c3e95046
Author: markus.t.metzger@intel.com <markus.t.metzger@intel.com>
AuthorDate: Wed, 2 Sep 2009 16:04:48 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 4 Sep 2009 09:26:40 +0200
x86, perf_counter, bts: Do not allow kernel BTS tracing for now
Kernel BTS tracing generates too much data too fast for us to
handle, causing the kernel to hang.
Fail for BTS requests for kernel code.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Acked-by: Peter Zijlstra <a.p.zjilstra@chello.nl>
LKML-Reference: <20090902140616.901253000@intel.com>
[ This is really a workaround - but we want BTS tracing in .32
so make sure we dont regress. The lockup should be fixed
ASAP. ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/cpu/perf_counter.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index 3776b0b..f9cd084 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -984,8 +984,15 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
* Branch tracing:
*/
if ((attr->config == PERF_COUNT_HW_BRANCH_INSTRUCTIONS) &&
- (hwc->sample_period == 1) && !bts_available())
- return -EOPNOTSUPP;
+ (hwc->sample_period == 1)) {
+ /* BTS is not supported by this architecture. */
+ if (!bts_available())
+ return -EOPNOTSUPP;
+
+ /* BTS is currently only allowed for user-mode. */
+ if (hwc->config & ARCH_PERFMON_EVENTSEL_OS)
+ return -EOPNOTSUPP;
+ }
hwc->config |= config;
prev parent reply other threads:[~2009-09-04 7:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 14:04 [patch 0/3] x86, perf_counter, bts: incorporate review feedback and fix bugs markus.t.metzger
2009-09-02 14:04 ` [patch 1/3] x86, perf_counter, bts: fail if BTS is not available markus.t.metzger
2009-09-04 7:58 ` [tip:perfcounters/core] x86, perf_counter, bts: Fail " tip-bot for markus.t.metzger@intel.com
2009-09-02 14:04 ` [patch 2/3] x86, perf_counter, bts: correct pointer-to-u64 casts markus.t.metzger
2009-09-04 7:58 ` [tip:perfcounters/core] x86, perf_counter, bts: Correct " tip-bot for markus.t.metzger@intel.com
2009-09-02 14:04 ` [patch 3/3] x86, perf_counter, bts: do not allow kernel BTS tracing markus.t.metzger
2009-09-04 7:58 ` tip-bot for markus.t.metzger@intel.com [this message]
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=tip-1653192f510bd8114b7b133d7289e6e5c3e95046@git.kernel.org \
--to=markus.t.metzger@intel.com \
--cc=a.p.zjilstra@chello.nl \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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
Powered by JetHome