Re: [PATCH] perf: Fix 0 count issue of cpu-clock
From: Mi, Dapeng
Date: Mon Dec 08 2025 - 00:17:23 EST
On 12/6/2025 7:44 AM, Ian Rogers wrote:
> On Tue, Nov 18, 2025 at 3:24 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>> On Tue, Nov 18, 2025 at 07:22:24PM +0800, Mi, Dapeng wrote:
>>> On 11/18/2025 7:04 PM, Peter Zijlstra wrote:
>>>> On Tue, Nov 18, 2025 at 12:03:09PM +0100, Peter Zijlstra wrote:
>>>>> Also, the few comments we do have already note that ->del() must do
>>>>> ->stop(EF_UPDATE).
> Hi Peter,
>
> I was trying to do a quick sanity check that other callers of stop
> were passing in EF_UPDATE. I wondered if the case of
> perf_event_throttle_group with leader sampling has an issue? The
> throttle should only happen on an event or group leader that is in
> sampling mode, but the group members could be non-sampling with leader
> sampling. Sorry for the noise if I'm wrong on this. Fwiw, the other
> uses either pass in EF_UPDATE or I think for __perf_event_aux_pause
> and __perf_event_overflow the problem isn't relevant.
Base on the logic, it looks we need to add the flag EF_UPDATE in
perf_event_throttle_group(), but need Peter's confirm.
>
> Thanks,
> Ian
>