perf stat: Add --pre and --post command
authorPeter Zijlstra <peterz@infradead.org>
Tue, 23 Oct 2012 11:40:14 +0000 (13:40 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 26 Oct 2012 13:22:25 +0000 (11:22 -0200)
commit1f16c5754d3a4008c29f3bf67b4f1271313ba385
tree365f7e0630b149593d81f56edc5b3f34cf2a3081
parent54a3cf59b53b3f01989a28344ecf4cb68217a6f6
perf stat: Add --pre and --post command

In order to measure kernel builds, one has to do some pre/post cleanup
work in order to do the repeat build.

So provide --pre and --post command hooks to allow doing just that.

  perf stat --repeat 10 --null --sync --pre 'make -s O=defconfig-build/clean' \
-- make -s -j64 O=defconfig-build/ bzImage

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Stephane Eranian <eranian@gmail.com>
Link: http://lkml.kernel.org/r/1350992414.13456.5.camel@twins
[ committer note: Added respective entries in Documentation/perf-stat.txt ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-stat.txt
tools/perf/builtin-stat.c