linux-stable/tools/perf/Documentation
Stephane Eranian 4aa9015f8b perf stat: Add -o and --append options
This patch adds an option (-o) to save the output of perf stat into a
file. You could do this with perf record but not with perf stat.
Instead, you had to fiddle with stderr to save the counts into a
separate file.

The patch also adds the --append option so that results can be
concatenated into a single file across runs. Each run of the tool is
clearly separated by a comment line starting with a hash mark. The -A
option of perf record is already used by perf stat, so we only add a
long option.

$ perf stat -o res.txt date
$ cat res.txt

 Performance counter stats for 'date':

          0.791306 task-clock                #    0.668 CPUs utilized
                 2 context-switches          #    0.003 M/sec
                 0 CPU-migrations            #    0.000 M/sec
               197 page-faults               #    0.249 M/sec
           1878143 cycles                    #    2.373 GHz
   <not supported> stalled-cycles-frontend
   <not supported> stalled-cycles-backend
           1083367 instructions              #    0.58  insns per cycle
            193027 branches                  #  243.935 M/sec
              9014 branch-misses             #    4.67% of all branches

       0.001184746 seconds time elapsed

The option can be combined with -x to make the output file much easier
to parse.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20110815202233.GA18535@quad
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2011-08-18 07:46:13 -03:00
..
asciidoc.conf perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
examples.txt perf: Rename perf-examples.txt to examples.txt 2009-08-17 10:43:42 +02:00
Makefile perf tools: Update Makefile with some help 2011-02-16 14:47:56 -02:00
manpage-1.72.xsl perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
manpage-base.xsl perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
manpage-bold-literal.xsl perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
manpage-normal.xsl perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
manpage-suppress-sp.xsl perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
perf-annotate.txt perf annotate: Add --symfs option 2011-08-18 07:40:34 -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 man pages: Fix cut'n'paste error 2010-07-28 11:30:10 -03:00
perf-buildid-list.txt perf buildid-list: Document missing options 2010-12-01 18:22:45 -02:00
perf-diff.txt perf symbols: Add symfs option for off-box analysis using specified tree 2010-12-21 20:17:51 -02:00
perf-evlist.txt perf evlist: New command to list the names of events present in a perf.data file 2011-03-15 11:10:48 -03:00
perf-help.txt perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
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 kvm: Document missing options 2010-12-01 18:22:46 -02:00
perf-list.txt perf list: Allow filtering list of events 2011-02-17 15:38:58 -02:00
perf-lock.txt perf lock: Document valid sort keys 2011-02-23 07:29:33 -03:00
perf-probe.txt perf probe: Support adding probes on offline kernel modules 2011-07-15 16:25:12 -04:00
perf-record.txt perf tool: Add cgroup support 2011-02-16 13:30:48 +01:00
perf-report.txt perf report/annotate/script: Add option to specify a CPU range 2011-07-05 10:44:44 +02:00
perf-sched.txt perf sched: Document missing options 2010-12-01 18:22:48 -02:00
perf-script-perl.txt sched: Get rid of lock_depth 2011-04-24 13:18:38 +02:00
perf-script-python.txt sched: Get rid of lock_depth 2011-04-24 13:18:38 +02:00
perf-script.txt perf report/annotate/script: Add option to specify a CPU range 2011-07-05 10:44:44 +02:00
perf-stat.txt perf stat: Add -o and --append options 2011-08-18 07:46:13 -03:00
perf-test.txt perf test: Fix spelling mistake in documentation 2010-12-01 18:22:49 -02:00
perf-timechart.txt perf symbols: Add symfs option for off-box analysis using specified tree 2010-12-21 20:17:51 -02:00
perf-top.txt perf top: Document missing options 2010-12-01 18:22:48 -02:00
perf.txt perf: Fix few typos + cosmetics 2010-01-13 17:39:44 +01:00