perf metricgroups: Add NO_THRESHOLD_AND_NMI constraint
authorIan Rogers <irogers@google.com>
Sat, 19 Jul 2025 03:05:17 +0000 (20:05 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 24 Jul 2025 20:41:36 +0000 (13:41 -0700)
commitfcc7cc31239d0fbf0ebf25e65f7f572caed40206
treec4012b5acdcfd9a3c1aaf388ca27272bd8d78b06
parent8dcd27b1b8661f64e220bc26a499865261d5d0f1
perf metricgroups: Add NO_THRESHOLD_AND_NMI constraint

Thresholds can increase the number of counters a metric needs. The NMI
watchdog can take away a counter (hopefully the buddy watchdog will
become the default and this will no longer be true). Add a new
constraint for the case that a metric and its thresholds would fit in
counters but only if the NMI watchdog isn't enabled. Either the
threshold or the NMI watchdog should be disabled to make the metric
fit. Wire this up into the metric__group_events logic.

Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250719030517.1990983-16-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/pmu-events/jevents.py
tools/perf/pmu-events/pmu-events.h
tools/perf/util/metricgroup.c