diff options
author | Anton Blanchard <anton@samba.org> | 2010-02-08 22:43:05 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-09 04:52:40 -0500 |
commit | 7fbfc683f1cc4051aa095ebe48d9d1e8b015682d (patch) | |
tree | cfea1d40d29cf6c835cf75c1b1ab5a9228d088d4 /tools/perf/util/event.c | |
parent | cd757645fbdc34a8343c04bb0e74e06fccc2cb10 (diff) |
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@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: fweisbec@gmail.com
LKML-Reference: <20100209034304.GA3702@kryten>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r-- | 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 bb0fd6da2d56..8a9e6baa3099 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, | |||
295 | al->thread = self; | 295 | al->thread = self; |
296 | al->addr = addr; | 296 | al->addr = addr; |
297 | 297 | ||
298 | if (cpumode & PERF_RECORD_MISC_KERNEL) { | 298 | if (cpumode == PERF_RECORD_MISC_KERNEL) { |
299 | al->level = 'k'; | 299 | al->level = 'k'; |
300 | mg = &session->kmaps; | 300 | mg = &session->kmaps; |
301 | } else if (cpumode & PERF_RECORD_MISC_USER) | 301 | } else if (cpumode == PERF_RECORD_MISC_USER) |
302 | al->level = '.'; | 302 | al->level = '.'; |
303 | else { | 303 | else { |
304 | al->level = 'H'; | 304 | al->level = 'H'; |