From: Andi Kleen Date: Wed, 17 Feb 2016 22:44:00 +0000 (-0800) Subject: perf stat: Handled scaled == -1 case for counters X-Git-Tag: v4.6-rc1~165^2~45^2~16 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=b002f3bbd321993c1a6d56b86544065420156ab9;p=linux.git perf stat: Handled scaled == -1 case for counters Arnaldo pointed out that the earlier cb110f471025 ("perf stat: Move noise/running printing into printout") change changed behavior for not counted counters. This patch fixes it again. Signed-off-by: Andi Kleen Cc: Jiri Olsa Cc: Stephane Eranian Fixes: cb110f471025 ("perf stat: Move noise/running printing into printout") Link: http://lkml.kernel.org/r/1455749045-18098-2-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 15e4fcf34e0c..86289dfcb452 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",