mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 19:13:47 +02:00
perf stat: Display metric-only for 0 counters
0 counters may occur in hypervisor settings but metric-only output is always expected. This resolves an issue in the "perf stat STD output linter" test. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Thomas Falcon <thomas.falcon@intel.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
efee18981a
commit
289815011c
|
|
@ -913,6 +913,9 @@ static bool should_skip_zero_counter(struct perf_stat_config *config,
|
|||
if (verbose == 0 && counter->skippable && !counter->supported)
|
||||
return true;
|
||||
|
||||
/* Metric only counts won't be displayed but the metric wants to be computed. */
|
||||
if (config->metric_only)
|
||||
return false;
|
||||
/*
|
||||
* Skip value 0 when enabling --per-thread globally,
|
||||
* otherwise it will have too many 0 output.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user