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]
Message-ID: <20150313073647.GB20081@gmail.com>
Date:	Fri, 13 Mar 2015 08:36:47 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [PATCH 20/24] perf stat: Always correctly indent ratio column


* Arnaldo Carvalho de Melo <acme@...nel.org> wrote:

> From: Andi Kleen <ak@...ux.intel.com>
> 
> When cycles or instructions do not print anything, as in being,
> --per-socket or --per-core modi, the ratio column was not correctly
> indented for them. This lead to some ratios not lining up with the
> others. Always indent correctly when nothing is printed.
> 
> Signed-off-by: Andi Kleen <ak@...ux.intel.com>
> Link: http://lkml.kernel.org/r/1426087682-22765-3-git-send-email-andi@firstfloor.org
> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
> ---
>  tools/perf/builtin-stat.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index e78c68df2152..41b296fff307 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -1093,7 +1093,8 @@ static void abs_printout(int id, int nr, struct perf_evsel *evsel, double avg)
>  		if (total) {
>  			ratio = avg / total;
>  			fprintf(output, " #   %5.2f  insns per cycle        ", ratio);
> -		}
> +		} else
> +			fprintf(output, "                                   ");

The standard pattern is symmetric curly braces.

> @@ -1162,7 +1163,8 @@ static void abs_printout(int id, int nr, struct perf_evsel *evsel, double avg)
>  		if (total) {
>  			ratio = avg / total;
>  			fprintf(output, " # %8.3f GHz                    ", ratio);
> -		}
> +		} else
> +			fprintf(output, "                                   ");

Ditto...

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ