Re: [PATCH v5 1/1] events/core: fix failure case for accounting child_total_enable_time at task exit

From: Yeo Reum Yun
Date: Sat Mar 29 2025 - 07:31:51 EST


Hi @Peter and @Ingo.

Could you apply this simple bug fix unless there's no problem please?

Thanks.

________________________________________
From: Leo Yan <leo.yan@xxxxxxx>
Sent: 27 March 2025 11:03
To: Yeo Reum Yun
Cc: peterz@xxxxxxxxxxxxx; mingo@xxxxxxxxxx; mingo@xxxxxxxxxx; acme@xxxxxxxxxx; namhyung@xxxxxxxxxx; Mark Rutland; alexander.shishkin@xxxxxxxxxxxxxxx; jolsa@xxxxxxxxxx; irogers@xxxxxxxxxx; adrian.hunter@xxxxxxxxx; kan.liang@xxxxxxxxxxxxxxx; elver@xxxxxxxxxx; james.clark@xxxxxxxxxx; Suzuki Poulose; Mike Leach; linux-perf-users@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v5 1/1] events/core: fix failure case for accounting child_total_enable_time at task exit

On Wed, Mar 26, 2025 at 08:20:03AM +0000, Yeoreum Yun wrote:

[...]

> After this patch, this problem is gone like:
>
> sudo ./perf stat -vvv -e armv8_pmuv3_0/event=0x08/ -e armv8_pmuv3_1/event=0x08/ -- stress-ng --pthread=2 -t 10s
> ...
> armv8_pmuv3_0/event=0x08/: 15396770398 32157963940 21898169000
> armv8_pmuv3_1/event=0x08/: 22428964974 32157963940 10259794940
>
> Performance counter stats for 'stress-ng --pthread=2 -t 10s':
>
> 15,396,770,398 armv8_pmuv3_0/event=0x08/ (68.10%)
> 22,428,964,974 armv8_pmuv3_1/event=0x08/ (31.90%)
>
> Signed-off-by: Yeoreum Yun <yeoreum.yun@xxxxxxx>
> Suggested-by: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Fixes: ef54c1a476aef ("perf: Rework perf_event_exit_event()")

Tested-by: Leo Yan <leo.yan@xxxxxxx>