perf stat: Introduce --repeat forever
authorFrederik Deweerdt <frederik.deweerdt@xprog.eu>
Fri, 1 Mar 2013 18:02:27 +0000 (13:02 -0500)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 15 Mar 2013 17:01:26 +0000 (14:01 -0300)
commita7e191c376fad084d9f3c7ac89a1f7c47462ebc8
tree15f13ba7e2bc804f6993faaac9c72a894fa0135d
parentd723a55096b81a13c319485f01994e0a539efcf9
perf stat: Introduce --repeat forever

The following patch causes 'perf stat --repeat 0' to be interpreted as
'forever', displaying the stats for every run.

We act as if a single run was asked, and reset the stats in each
iteration. In this mode SIGINT is passed to perf to be able to stop the
loop with Ctrl+C.

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20130301180227.GA24385@ks398093.ip-192-95-24.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-stat.txt
tools/perf/builtin-stat.c
tools/perf/util/evsel.c
tools/perf/util/evsel.h