perf stat: Do not pass runtime_stat to printout()
authorNamhyung Kim <namhyung@kernel.org>
Wed, 23 Nov 2022 18:02:04 +0000 (10:02 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 24 Nov 2022 12:40:10 +0000 (09:40 -0300)
It always passes a pointer to rt_stat as it's the only one.  Let's not
pass it and directly refer it in the printout().

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Link: https://lore.kernel.org/r/20221123180208.2068936-12-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/stat-display.c

index dd190f7..cdf4ca7 100644 (file)
@@ -674,8 +674,7 @@ static bool is_mixed_hw_group(struct evsel *counter)
 }
 
 static void printout(struct perf_stat_config *config, struct outstate *os,
-                    double uval, u64 run, u64 ena, double noise,
-                    struct runtime_stat *st, int map_idx)
+                    double uval, u64 run, u64 ena, double noise, int map_idx)
 {
        struct perf_stat_output_ctx out;
        print_metric_t pm;
@@ -737,7 +736,7 @@ static void printout(struct perf_stat_config *config, struct outstate *os,
 
        if (ok) {
                perf_stat__print_shadow_stats(config, counter, uval, map_idx,
-                                             &out, &config->metric_events, st);
+                                             &out, &config->metric_events, &rt_stat);
        } else {
                pm(config, &os, /*color=*/NULL, /*format=*/NULL, /*unit=*/"", /*val=*/0);
        }
@@ -834,7 +833,7 @@ static void print_counter_aggrdata(struct perf_stat_config *config,
 
        uval = val * counter->scale;
 
-       printout(config, &os, uval, run, ena, avg, &rt_stat, s);
+       printout(config, &os, uval, run, ena, avg, s);
 
        if (!metric_only)
                fputc('\n', output);
@@ -987,7 +986,7 @@ static void print_no_aggr_metric(struct perf_stat_config *config,
                        run = ps->aggr[counter_idx].counts.run;
 
                        uval = val * counter->scale;
-                       printout(config, &os, uval, run, ena, 1.0, &rt_stat, counter_idx);
+                       printout(config, &os, uval, run, ena, 1.0, counter_idx);
                }
                if (!first)
                        print_metric_end(config);