diff options
| author | Ian Rogers <[email protected]> | 2025-04-03 19:43:35 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2025-05-12 17:18:16 +0000 |
| commit | f60c3f44689ac2bc33340f37adbc837a4fb79c91 (patch) | |
| tree | a94898eb0927c57617bb5a9c5365ffd878bf4afb /tools/perf/tests/shell/lib/perf_metric_validation.py | |
| parent | libperf cpumap: Add ability to create CPU from a single CPU number (diff) | |
| download | kernel-f60c3f44689ac2bc33340f37adbc837a4fb79c91.tar.gz kernel-f60c3f44689ac2bc33340f37adbc837a4fb79c91.zip | |
perf stat: Use counter cpumask to skip zero values
When a counter is 0 it may or may not be skipped.
For uncore counters it is common they are only valid on 1 logical CPU
and all other CPUs should be skipped.
The PMU's cpumask was used for the skip calculation, but that cpumask
may not reflect user overrides.
Similarly a counter on a core PMU may explicitly not request a CPU be
gathered.
If the counter on this CPU's value is 0 then the counter should be
skipped as it wasn't requested.
Switch from using the PMU cpumask to that associated with the evsel to
support these cases.
Avoid potential crash with --per-thread mode where config->aggr_get_id
is NULL. Add some examples for the tool event 0 counter skipping.
Signed-off-by: Ian Rogers <[email protected]>
Tested-by: Kan Liang <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Dominique Martinet <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Leo Yan <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Weilin Wang <[email protected]>
Cc: Yicong Yang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/tests/shell/lib/perf_metric_validation.py')
0 files changed, 0 insertions, 0 deletions
