]> git.karo-electronics.de Git - karo-tx-linux.git/commit
perf stat: Avoid fractional digits for integer scales
authorAndi Kleen <ak@linux.intel.com>
Thu, 5 May 2016 23:04:03 +0000 (16:04 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 17 May 2016 02:11:13 +0000 (23:11 -0300)
commite3b03b6c1a4f3b4564be08809f58584592621a0a
tree6b2fed2e169c8750ef1d447ac9fc7824ea76c9d5
parent3f56e687a138481894a1088d5aa7d41951bdb020
perf stat: Avoid fractional digits for integer scales

When the scaling factor is a full integer don't display fractional
digits. This avoids unnecessary .00 output for topdown metrics with
scale factors.

v2: Remove redundant check.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1462489447-31832-7-git-send-email-andi@firstfloor.org
[ Rename 'round' to 'stat_round' as 'round' is defined in math.h,
  included by this patch, and this breaks the build on ubuntu 12.04 ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-stat.c