diff options
author | Andi Kleen <ak@linux.intel.com> | 2014-09-24 10:34:46 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-11-16 05:41:54 -0500 |
commit | 7550ddffe4c8040db31c66e5bd64531e2916bbf1 (patch) | |
tree | fe7f49a866cf71ac34fb8d97ce06eef51875f371 /arch/x86/kernel/cpu/perf_event.h | |
parent | c0737ce453bdccd0d09aa4f916795533a4e02fef (diff) |
perf/x86: Add INTEL_FLAGS_UEVENT_CONSTRAINT
Add a FLAGS_UEVENT_CONSTRAINT macro that allows us to
match on event+umask, and in additional all flags.
This is needed to ensure the INV and CMASK fields
are zero for specific events, as this can cause undefined
behavior.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Maria Dimakopoulou <maria.n.dimakopoulou@gmail.com>
Cc: Mark Davies <junk@eslaf.co.uk>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1411569288-5627-1-git-send-email-andi@firstfloor.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event.h')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h index fc5eb390b368..4e6cdb0ddc70 100644 --- a/arch/x86/kernel/cpu/perf_event.h +++ b/arch/x86/kernel/cpu/perf_event.h | |||
@@ -253,6 +253,10 @@ struct cpu_hw_events { | |||
253 | #define INTEL_UEVENT_CONSTRAINT(c, n) \ | 253 | #define INTEL_UEVENT_CONSTRAINT(c, n) \ |
254 | EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVENT_MASK) | 254 | EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVENT_MASK) |
255 | 255 | ||
256 | /* Like UEVENT_CONSTRAINT, but match flags too */ | ||
257 | #define INTEL_FLAGS_UEVENT_CONSTRAINT(c, n) \ | ||
258 | EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVENT_MASK|X86_ALL_EVENT_FLAGS) | ||
259 | |||
256 | #define INTEL_PLD_CONSTRAINT(c, n) \ | 260 | #define INTEL_PLD_CONSTRAINT(c, n) \ |
257 | __EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVENT_MASK|X86_ALL_EVENT_FLAGS, \ | 261 | __EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVENT_MASK|X86_ALL_EVENT_FLAGS, \ |
258 | HWEIGHT(n), 0, PERF_X86_EVENT_PEBS_LDLAT) | 262 | HWEIGHT(n), 0, PERF_X86_EVENT_PEBS_LDLAT) |