perf stat: Fix -nan% output in perf stat noise printouts
authorIngo Molnar <mingo@elte.hu>
Wed, 27 Apr 2011 03:35:39 +0000 (05:35 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 26 Apr 2011 18:04:57 +0000 (20:04 +0200)
commitf99844cb76b7d347711c22cdcb94266b7214141f
tree37d8147d32f9e76269952f142180566e937c4d71
parent1fc570ad89e55dc32dfa4dda1311948b38f26524
perf stat: Fix -nan% output in perf stat noise printouts

Before:

                 0 CPU-migrations           #    0.000 M/sec                    ( +-  -nan% )

After:

                 0 CPU-migrations           #    0.000 M/sec                    ( +-  0.00% )

Also factor out the noise printing function.

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/n/tip-z89h2v1bk1mikcbsf7e6v34q@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-stat.c