lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 23 Nov 2022 15:20:59 -0800
From:   Ian Rogers <irogers@...gle.com>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...nel.org>, Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        linux-perf-users@...r.kernel.org,
        Kan Liang <kan.liang@...ux.intel.com>,
        Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
        James Clark <james.clark@....com>,
        Athira Jajeev <atrajeev@...ux.vnet.ibm.com>
Subject: Re: [PATCH 02/15] perf stat: Move summary prefix printing logic in
 CSV output

On Wed, Nov 23, 2022 at 10:02 AM Namhyung Kim <namhyung@...nel.org> wrote:
>
> It matches to the prefix (interval timestamp), so better to have them together.
> No functional change intended.
>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>

Acked-by: Ian Rogers <irogers@...gle.com>

Thanks,
Ian

> ---
>  tools/perf/util/stat-display.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c
> index 46e90f0bb423..d86f2f8e020d 100644
> --- a/tools/perf/util/stat-display.c
> +++ b/tools/perf/util/stat-display.c
> @@ -713,11 +713,6 @@ static void printout(struct perf_stat_config *config, struct aggr_cpu_id id, int
>                 nl = config->metric_only ? new_line_metric : new_line_std;
>         }
>
> -       if (!config->no_csv_summary && config->csv_output &&
> -           config->summary && !config->interval && !config->metric_only) {
> -               fprintf(config->output, "%16s%s", "summary", config->csv_sep);
> -       }
> -
>         if (run == 0 || ena == 0 || counter->counts->scaled == -1) {
>                 if (config->metric_only) {
>                         pm(config, &os, NULL, "", "", 0);
> @@ -828,8 +823,13 @@ static void print_counter_aggrdata(struct perf_stat_config *config,
>         ena = aggr->counts.ena;
>         run = aggr->counts.run;
>
> -       if (prefix && !metric_only)
> -               fprintf(output, "%s", prefix);
> +       if (!metric_only) {
> +               if (prefix)
> +                       fprintf(output, "%s", prefix);
> +               else if (config->summary && config->csv_output &&
> +                        !config->no_csv_summary && !config->interval)
> +                       fprintf(output, "%16s%s", "summary", config->csv_sep);
> +       }
>
>         uval = val * counter->scale;
>
> --
> 2.38.1.584.g0f3c55d4c2-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ