]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
perf/x86/intel: Do not enable large PEBS for events with aux actions or aux sampling
authorAdrian Hunter <adrian.hunter@intel.com>
Tue, 22 Oct 2024 15:59:10 +0000 (18:59 +0300)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 5 Nov 2024 11:55:44 +0000 (12:55 +0100)
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
arch/x86/events/intel/core.c

index 7ca40002a19b81c70feb219c5604f033ce51aa0b..bb284aff7bfd6d7474a7563f931d59d6300a1473 100644 (file)
@@ -3962,8 +3962,8 @@ static int intel_pmu_hw_config(struct perf_event *event)
 
                if (!(event->attr.freq || (event->attr.wakeup_events && !event->attr.watermark))) {
                        event->hw.flags |= PERF_X86_EVENT_AUTO_RELOAD;
-                       if (!(event->attr.sample_type &
-                             ~intel_pmu_large_pebs_flags(event))) {
+                       if (!(event->attr.sample_type & ~intel_pmu_large_pebs_flags(event)) &&
+                           !has_aux_action(event)) {
                                event->hw.flags |= PERF_X86_EVENT_LARGE_PEBS;
                                event->attach_state |= PERF_ATTACH_SCHED_CB;
                        }