diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2011-10-05 14:01:17 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-10-06 13:00:31 +0200 |
commit | 011af857847a7ebe1f45342b29ff9f390515a4b8 (patch) | |
tree | 3645fd8d9f8b7a40b79d779db4e9ac29b7af0123 /arch/x86/include/asm/perf_event.h | |
parent | perf, core: Introduce attrs to count in either host or guest mode (diff) | |
download | linux-011af857847a7ebe1f45342b29ff9f390515a4b8.tar.xz linux-011af857847a7ebe1f45342b29ff9f390515a4b8.zip |
perf, amd: Use GO/HO bits in perf-ctr
The AMD perf-counters support counting in guest or host-mode
only. Make use of that feature when user-space specified
guest/host-mode only counting.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1317816084-18026-3-git-send-email-gleb@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/perf_event.h')
-rw-r--r-- | arch/x86/include/asm/perf_event.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h index 094fb30817ab..ce2bfb335384 100644 --- a/arch/x86/include/asm/perf_event.h +++ b/arch/x86/include/asm/perf_event.h @@ -29,6 +29,9 @@ #define ARCH_PERFMON_EVENTSEL_INV (1ULL << 23) #define ARCH_PERFMON_EVENTSEL_CMASK 0xFF000000ULL +#define AMD_PERFMON_EVENTSEL_GUESTONLY (1ULL << 40) +#define AMD_PERFMON_EVENTSEL_HOSTONLY (1ULL << 41) + #define AMD64_EVENTSEL_EVENT \ (ARCH_PERFMON_EVENTSEL_EVENT | (0x0FULL << 32)) #define INTEL_ARCH_EVENT_MASK \ |