os->nr = aggr->nr;
os->evsel = counter;
- if (counter->supported && aggr->nr == 0)
+ /* Skip already merged uncore/hybrid events */
+ if (counter->merged_stat)
return;
uniquify_counter(config, counter);
ena = aggr->counts.ena;
run = aggr->counts.run;
+ /*
+ * Skip value 0 when enabling --per-thread globally, otherwise it will
+ * have too many 0 output.
+ */
+ if (val == 0 && config->aggr_mode == AGGR_THREAD && config->system_wide)
+ return;
+
if (!metric_only) {
if (config->json_output)
fputc('{', output);
print_metric_begin(config, evlist, os, s);
evlist__for_each_entry(evlist, counter) {
- if (counter->merged_stat)
- continue;
-
print_counter_aggrdata(config, counter, s, os);
}
print_metric_end(config, os);
print_metric_begin(config, evlist, os, s);
evlist__for_each_entry(evlist, counter) {
- if (counter->merged_stat)
- continue;
-
if (counter->cgrp != os->cgrp)
continue;
if (!config->aggr_map)
return;
- if (counter->merged_stat)
- return;
-
for (s = 0; s < config->aggr_map->nr; s++) {
print_counter_aggrdata(config, counter, s, os);
}