Skip to content

Commit 7550ddf

Browse files
Andi Kleeningomolnar
authored andcommitted
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>
1 parent c0737ce commit 7550ddf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎arch/x86/kernel/cpu/perf_event.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ struct cpu_hw_events {
253253
#define INTEL_UEVENT_CONSTRAINT(c, n) \
254254
EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVENT_MASK)
255255

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+
256260
#define INTEL_PLD_CONSTRAINT(c, n) \
257261
__EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVENT_MASK|X86_ALL_EVENT_FLAGS, \
258262
HWEIGHT(n), 0, PERF_X86_EVENT_PEBS_LDLAT)

0 commit comments

Comments
 (0)