From 1f16c5754d3a4008c29f3bf67b4f1271313ba385 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Tue, 23 Oct 2012 13:40:14 +0200 Subject: 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 Acked-by: Ingo Molnar Cc: Stephane Eranian 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 --- tools/perf/Documentation/perf-stat.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/perf/Documentation') diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt index 2fa173b5197..cf0c3107e06 100644 --- a/tools/perf/Documentation/perf-stat.txt +++ b/tools/perf/Documentation/perf-stat.txt @@ -108,6 +108,11 @@ with it. --append may be used here. Examples: 3>results perf stat --log-fd 3 -- $cmd 3>>results perf stat --log-fd 3 --append -- $cmd +--pre:: +--post:: + Pre and post measurement hooks, e.g.: + +perf stat --repeat 10 --null --sync --pre 'make -s O=defconfig-build/clean' -- make -s -j64 O=defconfig-build/ bzImage EXAMPLES -- cgit v1.2.3