diff options
author | Ian Rogers <irogers@google.com> | 2025-07-18 20:05:03 -0700 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2025-07-24 13:41:34 -0700 |
commit | 62f4512238f5541d864a783cbcd8d95d067a17b3 (patch) | |
tree | 815535aef0249004e91c0f83b98fb895298d33ad /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 12d30725bf997ffd5baa849d4b20be86105fc070 (diff) |
perf parse-events: Warn if a cpu term is unsupported by a CPU
Factor requested CPU warning out of evlist and into evsel. At the end
of adding an event, perform the warning check. To avoid repeatedly
testing if the cpu_list is empty, add a local variable.
```
$ perf stat -e cpu_atom/cycles,cpu=1/ -a true
WARNING: A requested CPU in '1' is not supported by PMU 'cpu_atom' (CPUs 16-27) for event 'cpu_atom/cycles/'
Performance counter stats for 'system wide':
<not supported> cpu_atom/cycles/
0.000781511 seconds time elapsed
```
Reviewed-by: Thomas Falcon <thomas.falcon@intel.com>
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: James Clark <james.clark@linaro.org>
Link: https://lore.kernel.org/r/20250719030517.1990983-2-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions