Re: [PATCH v2] perf stat: Fix false NMI watchdog warning in aggregation modes
From: Arnaldo Carvalho de Melo
Date: Thu Jun 11 2026 - 20:23:01 EST
On Thu, Jun 11, 2026 at 03:33:38PM -0700, Ian Rogers wrote:
> On Thu, Jun 11, 2026 at 2:56 PM Chun-Tse Shao <ctshao@xxxxxxxxxx> wrote:
> > To fix this, restrict setting of print_free_counters_hint to
> > only trigger for core PMU events by checking counter->pmu and
> > counter->pmu->is_core.
> > Assisted-by: Gemini:gemini-next
> > Signed-off-by: Chun-Tse Shao <ctshao@xxxxxxxxxx>
>
> Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
>
> The suggestion for something like:
> ```
> pmu = evsel__find_pmu(counter);
> if (pmu && pmu->is_core)
> ```
> isn't really necessary because we nearly always set the PMU. Also, a
> case where we lack a pmu has historically been for a core PMU, making
> the whole thing contradictory. The patch as-is is clear.
Thanks, applied to perf-tools-next, for v7.2.
- Arnaldo