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] [day] [month] [year] [list]
Message-ID: <20160217192749.GB5083@two.firstfloor.org>
Date:	Wed, 17 Feb 2016 20:27:49 +0100
From:	Andi Kleen <andi@...stfloor.org>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	Andi Kleen <andi@...stfloor.org>, jolsa@...nel.org,
	eranian@...gle.com, mingo@...nel.org, linux-kernel@...r.kernel.org,
	Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 3/8] perf, tools, stat: Move noise/running printing into
 printout

On Tue, Feb 16, 2016 at 05:02:56PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Sat, Jan 30, 2016 at 09:06:51AM -0800, Andi Kleen escreveu:
> > From: Andi Kleen <ak@...ux.intel.com>
> > 
> > Move the running/noise printing into printout to avoid
> > duplicated code in the callers.
> > 
> > v2: Merged with other patches. Remove unnecessary hunk.
> > Readd hunk that ended in earlier patch.
> > v3: Fix noise/running output in CSV mode
> > v4: Merge with later patch that also moves not supported printing.
> > Acked-by: Jiri Olsa <jolsa@...nel.org>
> 
> So, the description makes it look like this is just elliminating code
> duplication, but then, before we had:

Thanks. Here's a patch to fix it.

----

perf, tools, stat: Handled scaled == -1 case for counters
    
Arnaldo pointed out that the earlier
"Move noise/running printing into printout"
change changed behavior for not counted counters. This patch fixes it again.
    
Signed-off-by: Andi Kleen <ak@...ux.intel.com>

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 15e4fcf..86289df 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -860,7 +860,7 @@ static void printout(int id, int nr, struct perf_evsel *counter, double uval,
 
 	nl = new_line_std;
 
-	if (run == 0 || ena == 0) {
+	if (run == 0 || ena == 0 || counter->counts->scaled == -1) {
 		aggr_printout(counter, id, nr);
 
 		fprintf(stat_config.output, "%*s%s",

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ