Skip to content

Commit 5e4e355

Browse files
Dapeng MiPeter Zijlstra
authored andcommitted
perf/x86/intel: Correct large PEBS flag check
current large PEBS flag check only checks if sample_regs_user contains unsupported GPRs but doesn't check if sample_regs_intr contains unsupported GPRs. Of course, currently PEBS HW supports to sample all perf supported GPRs, the missed check doesn't cause real issue. But it won't be true any more after the subsequent patches support to sample SSP register. SSP sampling is not supported by adaptive PEBS HW and it would be supported until arch-PEBS HW. So correct this issue. Fixes: a47ba4d ("perf/x86: Enable free running PEBS for REGS_USER/INTR") Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20251029102136.61364-5-dapeng1.mi@linux.intel.com
1 parent ee98b8b commit 5e4e355

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

arch/x86/events/intel/core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4029,7 +4029,9 @@ static unsigned long intel_pmu_large_pebs_flags(struct perf_event *event)
40294029
if (!event->attr.exclude_kernel)
40304030
flags &= ~PERF_SAMPLE_REGS_USER;
40314031
if (event->attr.sample_regs_user & ~PEBS_GP_REGS)
4032-
flags &= ~(PERF_SAMPLE_REGS_USER | PERF_SAMPLE_REGS_INTR);
4032+
flags &= ~PERF_SAMPLE_REGS_USER;
4033+
if (event->attr.sample_regs_intr & ~PEBS_GP_REGS)
4034+
flags &= ~PERF_SAMPLE_REGS_INTR;
40334035
return flags;
40344036
}
40354037

0 commit comments

Comments
 (0)