summaryrefslogtreecommitdiffstats
path: root/tools/perf/Documentation/perf-stat.txt
diff options
context:
space:
mode:
authorStephane Eranian <eranian@google.com>2011-08-15 22:22:33 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-08-18 07:46:13 -0300
commit4aa9015f8bfd2c8d7cc33a360275b71a9d708b37 (patch)
tree868d22562ba20ed87698e69cf33d29cce19764fb /tools/perf/Documentation/perf-stat.txt
parente71a059832753a8834a5a5080366879954ccdc4d (diff)
downloadblackbird-op-linux-4aa9015f8bfd2c8d7cc33a360275b71a9d708b37.tar.gz
blackbird-op-linux-4aa9015f8bfd2c8d7cc33a360275b71a9d708b37.zip
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>
Diffstat (limited to 'tools/perf/Documentation/perf-stat.txt')
-rw-r--r--tools/perf/Documentation/perf-stat.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt
index 918cc38ee6d1..08394c4879a8 100644
--- a/tools/perf/Documentation/perf-stat.txt
+++ b/tools/perf/Documentation/perf-stat.txt
@@ -94,6 +94,13 @@ an empty cgroup (monitor all the time) using, e.g., -G foo,,bar. Cgroups must ha
corresponding events, i.e., they always refer to events defined earlier on the command
line.
+-o file::
+-output file::
+Print the output into the designated file.
+
+--append::
+Append to the output file designated with the -o option. Ignored if -o is not specified.
+
EXAMPLES
--------
OpenPOWER on IntegriCloud