perf: Fix hypervisor sample reporting
authorAnton Blanchard <anton@samba.org>
Tue, 9 Feb 2010 03:43:05 +0000 (14:43 +1100)
committerIngo Molnar <mingo@elte.hu>
Tue, 9 Feb 2010 09:52:40 +0000 (10:52 +0100)
commit7fbfc683f1cc4051aa095ebe48d9d1e8b015682d
treecfea1d40d29cf6c835cf75c1b1ab5a9228d088d4
parentcd757645fbdc34a8343c04bb0e74e06fccc2cb10
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>
tools/perf/util/event.c