linux/tools/perf/Documentation
Stephane Eranian 5af52b51f7 perf stat: add perf stat -B to pretty print large numbers
It is hard to read very large numbers so provide an option to perf stat
to separate thousands using a separator. The patch leverages the locale
support of stdio. You need to set your LC_NUMERIC appropriately, for
instance LC_NUMERIC=en_US.UTF8. You need to pass -B to activate this
feature. This way existing scripts parsing the output do not need to be
changed. Here is an example.

$ perf stat noploop 2
noploop for 2 seconds

 Performance counter stats for 'noploop 2':

        1998.347031  task-clock-msecs         #      0.998 CPUs
                 61  context-switches         #      0.000 M/sec
                  0  CPU-migrations           #      0.000 M/sec
                118  page-faults              #      0.000 M/sec
      4,138,410,900  cycles                   #   2070.917 M/sec  (scaled from 70.01%)
      2,062,650,268  instructions             #      0.498 IPC    (scaled from 70.01%)
      2,057,653,466  branches                 #   1029.678 M/sec  (scaled from 70.01%)
             40,267  branch-misses            #      0.002 %      (scaled from 30.04%)
      2,055,961,348  cache-references         #   1028.831 M/sec  (scaled from 30.03%)
             53,725  cache-misses             #      0.027 M/sec  (scaled from 30.02%)

        2.001393933  seconds time elapsed

$ perf stat -B  noploop 2
noploop for 2 seconds

 Performance counter stats for 'noploop 2':

        1998.297883  task-clock-msecs         #      0.998 CPUs
                 59  context-switches         #      0.000 M/sec
                  0  CPU-migrations           #      0.000 M/sec
                119  page-faults              #      0.000 M/sec
      4,131,380,160  cycles                   #   2067.450 M/sec  (scaled from 70.01%)
      2,059,096,507  instructions             #      0.498 IPC    (scaled from 70.01%)
      2,054,681,303  branches                 #   1028.216 M/sec  (scaled from 70.01%)
             25,650  branch-misses            #      0.001 %      (scaled from 30.05%)
      2,056,283,014  cache-references         #   1029.017 M/sec  (scaled from 30.03%)
             47,097  cache-misses             #      0.024 M/sec  (scaled from 30.02%)

        2.001391016  seconds time elapsed

Cc: David S. Miller <davem@davemloft.net>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <4bf28fe8.914ed80a.01ca.fffff5f5@mx.google.com>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-05-18 23:03:22 -03:00
..
asciidoc.conf
examples.txt perf: Rename perf-examples.txt to examples.txt 2009-08-17 10:43:42 +02:00
Makefile perf: Make the install relative to DESTDIR if specified 2010-03-11 14:08:11 +01:00
manpage-1.72.xsl
manpage-base.xsl
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-suppress-sp.xsl
perf-annotate.txt perf tools: Fixup minor doc formatting issues 2010-05-05 11:23:27 -03:00
perf-archive.txt perf archive: Add documentation 2010-01-20 08:54:58 +01:00
perf-bench.txt perf tools: Fixup minor doc formatting issues 2010-05-05 11:23:27 -03:00
perf-buildid-cache.txt perf inject: Add missing bits 2010-05-04 10:48:22 -03:00
perf-buildid-list.txt perf buildid-list: Always show the DSO name 2009-11-17 07:19:54 +01:00
perf-diff.txt perf tools: Fixup minor doc formatting issues 2010-05-05 11:23:27 -03:00
perf-help.txt
perf-inject.txt perf inject: Add missing bits 2010-05-04 10:48:22 -03:00
perf-kmem.txt perf tools: Fixup minor doc formatting issues 2010-05-05 11:23:27 -03:00
perf-kvm.txt perf: Some perf-kvm documentation edits 2010-04-24 03:50:49 +02:00
perf-list.txt perf list: Improve the raw hw event descriptor documentation 2010-05-07 14:07:05 -03:00
perf-lock.txt perf lock: Fix and add misc documentally things 2010-02-27 17:05:22 +01:00
perf-probe.txt perf probe: Add --max-probes option 2010-04-26 15:35:20 -03:00
perf-record.txt perf tools: change event inheritance logic in stat and record 2010-05-13 16:39:12 -03:00
perf-report.txt perf diff: Use perf_session__fprintf_hists just like 'perf record' 2009-12-16 16:53:37 +01:00
perf-sched.txt perf: cleanup some Documentation 2010-04-08 11:34:26 -03:00
perf-stat.txt perf stat: add perf stat -B to pretty print large numbers 2010-05-18 23:03:22 -03:00
perf-test.txt perf test: Initial regression testing command 2010-04-29 18:59:23 -03:00
perf-timechart.txt perf timechart: Add a process filter 2009-10-20 07:55:50 +02:00
perf-top.txt perf top: Teach it to autolocate vmlinux 2010-02-04 09:33:28 +01:00
perf-trace-perl.txt perf: Remove leftover useless options to record trace events from scripts 2010-04-30 19:55:00 +02:00
perf-trace-python.txt perf trace scripts: Fix typos in perf-trace-python.txt 2010-05-13 17:10:40 -03:00
perf-trace.txt perf tools: Fixup minor doc formatting issues 2010-05-05 11:23:27 -03:00
perf.txt perf: Fix few typos + cosmetics 2010-01-13 17:39:44 +01:00