mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:24:45 +01:00
perf test parse-metric: Ensure aggregate counts appear to have run
Commitbb5a920b90("perf stat: Ensure metrics are displayed even with failed events") with failed events") made it so that counters which weren't enabled in the kernel were handled as NaN in metrics. This caused the "Parse and process metrics" test to start failing as it wasn't putting a non-zero value in these variables. Add arbitrary values of 1 to fix the test. Fixes:bb5a920b90("perf stat: Ensure metrics are displayed even with failed events") Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Chun-Tse Shao <ctshao@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
c60ee958d6
commit
ff9aeb6bd1
1 changed files with 2 additions and 0 deletions
|
|
@ -41,6 +41,8 @@ static void load_runtime_stat(struct evlist *evlist, struct value *vals)
|
|||
count = find_value(evsel->name, vals);
|
||||
evsel->supported = true;
|
||||
evsel->stats->aggr->counts.val = count;
|
||||
evsel->stats->aggr->counts.ena = 1;
|
||||
evsel->stats->aggr->counts.run = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue