[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-7fbfc683f1cc4051aa095ebe48d9d1e8b015682d@git.kernel.org>
Date: Tue, 9 Feb 2010 10:52:00 GMT
From: tip-bot for Anton Blanchard <anton@...ba.org>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, acme@...hat.com, paulus@...ba.org,
anton@...ba.org, hpa@...or.com, mingo@...hat.com,
a.p.zijlstra@...llo.nl, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:perf/urgent] perf: Fix hypervisor sample reporting
Commit-ID: 7fbfc683f1cc4051aa095ebe48d9d1e8b015682d
Gitweb: http://git.kernel.org/tip/7fbfc683f1cc4051aa095ebe48d9d1e8b015682d
Author: Anton Blanchard <anton@...ba.org>
AuthorDate: Tue, 9 Feb 2010 14:43:05 +1100
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 9 Feb 2010 10:52:40 +0100
perf: Fix hypervisor sample reporting
cpumode bits are defined as such:
#define PERF_RECORD_MISC_KERNEL (1 << 0)
#define PERF_RECORD_MISC_USER (2 << 0)
#define PERF_RECORD_MISC_HYPERVISOR (3 << 0)
We need to compare against the complete value of cpumode,
otherwise hypervisor samples get incorrectly attributed as
userspace.
Signed-off-by: Anton Blanchard <anton@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: fweisbec@...il.com
LKML-Reference: <20100209034304.GA3702@...ten>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
tools/perf/util/event.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index bb0fd6d..8a9e6ba 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -295,10 +295,10 @@ void thread__find_addr_location(struct thread *self,
al->thread = self;
al->addr = addr;
- if (cpumode & PERF_RECORD_MISC_KERNEL) {
+ if (cpumode == PERF_RECORD_MISC_KERNEL) {
al->level = 'k';
mg = &session->kmaps;
- } else if (cpumode & PERF_RECORD_MISC_USER)
+ } else if (cpumode == PERF_RECORD_MISC_USER)
al->level = '.';
else {
al->level = 'H';
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists