From a1bca6cc87fee26f3d9120b3f3418b7edfc91ec2 Mon Sep 17 00:00:00 2001 From: Jim Cromie Date: Wed, 7 Sep 2011 17:14:02 -0600 Subject: [PATCH] perf stat: Suppress printing std-dev when its 0 For pretty output only (preserve column for cvs output), dont print std-deviation when its 0.00. Do this based upon value, instead of checking for --no-aggr, since the stats could conceivably be computed over the runs on each CPU, and theres no reason to preclude that. Link: http://lkml.kernel.org/r/1315437244-3788-4-git-send-email-jim.cromie@gmail.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Jim Cromie Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index af0d65b41416..076eda53cfba 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -528,7 +528,7 @@ static void print_noise_pct(double total, double avg) if (csv_output) fprintf(output, "%s%.2f%%", csv_sep, pct); - else + else if (pct) fprintf(output, " ( +-%6.2f%% )", pct); } -- 2.20.1