Re: [Patch v3 3/7] perf/x86: Check if cpuc->events[*] pointer exists before accessing it

From: Mi, Dapeng
Date: Wed Aug 20 2025 - 01:34:52 EST



On 8/20/2025 11:41 AM, Andi Kleen wrote:
>> event = cpuc->events[bit];
>> + /*
>> + * perf_event_overflow() called by below __intel_pmu_pebs_last_event()
>> + * could trigger interrupt throttle and clear all event pointers of the
>> + * group in cpuc->events[] to NULL. So need to re-check if cpuc->events[*]
>> + * is NULL, if so it indicates the event has been throttled (stopped) and
>> + * the corresponding last PEBS records have been processed in stopping
>> + * event, don't need to process it again.
>> + */
>> + if (!event)
>> + continue;
> Then we silently ignore the overflow. Would be better to log at least an overflow
> packet or something like that.

Andi, I didn't fully get the exact meaning about the "log" here. When
throttle is triggered, perf_event_throttle() has already called
perf_log_throttle() to log the throttle event although only for the group
leader. Is it enough?


>
> -Andi
>