[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y0adOTUulE/HnLU3@krava>
Date: Wed, 12 Oct 2022 12:55:53 +0200
From: Jiri Olsa <olsajiri@...il.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-perf-users@...r.kernel.org,
Kan Liang <kan.liang@...ux.intel.com>,
Leo Yan <leo.yan@...aro.org>, Andi Kleen <ak@...ux.intel.com>,
Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
James Clark <james.clark@....com>,
Xing Zhengjun <zhengjun.xing@...ux.intel.com>
Subject: Re: [PATCH 04/19] perf stat: Add aggr id for global mode
On Sun, Oct 09, 2022 at 10:35:45PM -0700, Namhyung Kim wrote:
> To make the code simpler, I'd like to use the same aggregation code for
> the global mode. We can simply add an id function to return cpu 0 and
> use print_aggr().
>
> No functional change intended.
>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
> tools/perf/builtin-stat.c | 39 ++++++++++++++++++++++++++++++++--
> tools/perf/util/cpumap.c | 10 +++++++++
> tools/perf/util/cpumap.h | 6 +++++-
> tools/perf/util/stat-display.c | 9 ++------
> 4 files changed, 54 insertions(+), 10 deletions(-)
>
SNIP
> diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c
> index 4113aa86772f..1d8e585df4ad 100644
> --- a/tools/perf/util/stat-display.c
> +++ b/tools/perf/util/stat-display.c
> @@ -1477,13 +1477,8 @@ void evlist__print_counters(struct evlist *evlist, struct perf_stat_config *conf
> if (config->iostat_run)
> iostat_print_counters(evlist, config, ts, prefix = buf,
> print_counter_aggr);
> - else {
> - evlist__for_each_entry(evlist, counter) {
> - print_counter_aggr(config, counter, prefix);
> - }
> - if (metric_only)
> - fputc('\n', config->output);
> - }
> + else
> + print_aggr(config, evlist, prefix);
this seems to break output for:
before:
# ./perf stat -M ipc -I 1000 --metric-only
# time IPC
1.000674320 0.61
2.001700284 0.66
3.003677500 0.67
4.005583140 0.64
after:
# ./perf stat -M ipc -I 1000 --metric-only
# time IPC
1.001004048 0.94
2.003120471 0.69
3.005030405 0.65
4.006788766 0.64
5.008004052 0.68
also should this hunk be in separate patch?
jirka
> break;
> case AGGR_NONE:
> if (metric_only)
> --
> 2.38.0.rc1.362.ged0d419d3c-goog
>
Powered by blists - more mailing lists