static void print_counter_aggrdata(struct perf_stat_config *config,
                                   struct evsel *counter, int s,
-                                  char *prefix, bool metric_only)
+                                  char *prefix)
 {
        FILE *output = config->output;
        u64 ena, run, val;
        struct perf_stat_aggr *aggr = &ps->aggr[s];
        struct aggr_cpu_id id = config->aggr_map->map[s];
        double avg = aggr->counts.val;
+       bool metric_only = config->metric_only;
 
        if (counter->supported && aggr->nr == 0)
                return;
                       struct evlist *evlist,
                       char *prefix)
 {
-       bool metric_only = config->metric_only;
        struct evsel *counter;
        int s;
 
                        if (counter->merged_stat)
                                continue;
 
-                       print_counter_aggrdata(config, counter, s, prefix,
-                                              metric_only);
+                       print_counter_aggrdata(config, counter, s, prefix);
                }
                print_metric_end(config);
        }
                              struct evlist *evlist,
                              char *prefix)
 {
-       bool metric_only = config->metric_only;
        struct evsel *counter, *evsel;
        struct cgroup *cgrp = NULL;
        int s;
                                if (counter->cgrp != cgrp)
                                        continue;
 
-                               print_counter_aggrdata(config, counter, s, prefix,
-                                                      metric_only);
+                               print_counter_aggrdata(config, counter, s, prefix);
                        }
                        print_metric_end(config);
                }
 static void print_counter(struct perf_stat_config *config,
                          struct evsel *counter, char *prefix)
 {
-       bool metric_only = config->metric_only;
        int s;
 
        /* AGGR_THREAD doesn't have config->aggr_get_id */
                return;
 
        for (s = 0; s < config->aggr_map->nr; s++) {
-               print_counter_aggrdata(config, counter, s, prefix,
-                                      metric_only);
+               print_counter_aggrdata(config, counter, s, prefix);
        }
 }
 
                if (found)
                        continue;
 
-               print_counter_aggrdata(config, counter, s, prefix, metric_only);
+               print_counter_aggrdata(config, counter, s, prefix);
 
                core_map->map[c++] = core_id;
        }