Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf stat: Do not pass runtime_stat to printout()

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>

authored by

Namhyung Kim and committed by
Arnaldo Carvalho de Melo
01577597 e7f4da31

+4 -5
+4 -5
tools/perf/util/stat-display.c
··· 674 674 } 675 675 676 676 static void printout(struct perf_stat_config *config, struct outstate *os, 677 - double uval, u64 run, u64 ena, double noise, 678 - struct runtime_stat *st, int map_idx) 677 + double uval, u64 run, u64 ena, double noise, int map_idx) 679 678 { 680 679 struct perf_stat_output_ctx out; 681 680 print_metric_t pm; ··· 736 737 737 738 if (ok) { 738 739 perf_stat__print_shadow_stats(config, counter, uval, map_idx, 739 - &out, &config->metric_events, st); 740 + &out, &config->metric_events, &rt_stat); 740 741 } else { 741 742 pm(config, &os, /*color=*/NULL, /*format=*/NULL, /*unit=*/"", /*val=*/0); 742 743 } ··· 833 834 834 835 uval = val * counter->scale; 835 836 836 - printout(config, &os, uval, run, ena, avg, &rt_stat, s); 837 + printout(config, &os, uval, run, ena, avg, s); 837 838 838 839 if (!metric_only) 839 840 fputc('\n', output); ··· 986 987 run = ps->aggr[counter_idx].counts.run; 987 988 988 989 uval = val * counter->scale; 989 - printout(config, &os, uval, run, ena, 1.0, &rt_stat, counter_idx); 990 + printout(config, &os, uval, run, ena, 1.0, counter_idx); 990 991 } 991 992 if (!first) 992 993 print_metric_end(config);