Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf/x86/intel: Do not enable large PEBS for events with aux actions or aux sampling

Events with aux actions or aux sampling expect the PMI to coincide with the
event, which does not happen for large PEBS, so do not enable large PEBS in
that case.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Link: https://lkml.kernel.org/r/20241022155920.17511-5-adrian.hunter@intel.com

authored by

Adrian Hunter and committed by
Peter Zijlstra
0d5eb14c 08c7454c

+2 -2
+2 -2
arch/x86/events/intel/core.c
··· 3962 3962 3963 3963 if (!(event->attr.freq || (event->attr.wakeup_events && !event->attr.watermark))) { 3964 3964 event->hw.flags |= PERF_X86_EVENT_AUTO_RELOAD; 3965 - if (!(event->attr.sample_type & 3966 - ~intel_pmu_large_pebs_flags(event))) { 3965 + if (!(event->attr.sample_type & ~intel_pmu_large_pebs_flags(event)) && 3966 + !has_aux_action(event)) { 3967 3967 event->hw.flags |= PERF_X86_EVENT_LARGE_PEBS; 3968 3968 event->attach_state |= PERF_ATTACH_SCHED_CB; 3969 3969 }