OSDN Git Service

perf config: Add stat.big-num support
authorPaul A. Clarke <pc@us.ibm.com>
Wed, 20 May 2020 16:23:35 +0000 (11:23 -0500)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 28 May 2020 13:03:27 +0000 (10:03 -0300)
commitd778a778a816cc9c910ac50dd665566b841df5f0
treeea61a6be1b2fd318d9bc298d6d7af4b6e5602aa5
parent04f9bf2bac72480ca1d289b751b956dd1707a5d5
perf config: Add stat.big-num support

Add support for new "stat.big-num" boolean option.

This allows a user to set a default for "--no-big-num" for "perf stat"
commands.

--
  $ perf config stat.big-num
  $ perf stat --event cycles /bin/true

   Performance counter stats for '/bin/true':

             778,849      cycles
  [...]
  $ perf config stat.big-num=false
  $ perf config stat.big-num
  stat.big-num=false
  $ perf stat --event cycles /bin/true

   Performance counter stats for '/bin/true':

              769622      cycles
  [...]
--

There is an interaction with "--field-separator" that must be
accommodated, such that specifying "--big-num --field-separator={x}"
still reports an invalid combination of options.

Documentation for perf-config and perf-stat updated.

Signed-off-by: Paul Clarke <pc@us.ibm.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: http://lore.kernel.org/lkml/1589991815-17951-1-git-send-email-pc@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-config.txt
tools/perf/Documentation/perf-stat.txt
tools/perf/builtin-stat.c
tools/perf/util/config.c
tools/perf/util/stat.h