Re: [perf] crashing bug in icl_update_topdown_event

From: Vince Weaver
Date: Wed Jun 11 2025 - 15:28:57 EST


On Wed, 11 Jun 2025, Liang, Kan wrote:

>
>
> It seems an regression from the f9bdf1f95339 ("perf/x86/intel: Avoid
> disable PMU if !cpuc->enabled in sample read").
> The commit merged the intel_pmu_auto_reload_read() and
> intel_pmu_read_topdown_event(). It's possible that a PEBS event 0x0400
> runs on a ATOM CPU. So the PERF_X86_EVENT_AUTO_RELOAD is set for the
> event. The is_topdown_event() also returns true.
>
> Does the below patch help?
> It checks the PERF_X86_EVENT_TOPDOWN flag as well before invoking the
> topdown functions.

With this patch applied my test case no longer crashes.

Thanks,

Vince Weaver
vincent.weaver@xxxxxxxxx