perf top: Allow disabling/enabling events dynamicly
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 17 Jun 2015 19:50:52 +0000 (16:50 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 17 Jun 2015 19:50:52 +0000 (16:50 -0300)
commit5d484f99aed547e235f2229653c95392a1bc3692
tree49989d6b2eea50b9c6610d051ed7c1df700755d3
parent2b56bcfb6f4bb0aa0813b6ee1dde8f5b23fce5d4
perf top: Allow disabling/enabling events dynamicly

Now it is possible to press CTRL+z at anytime and that will disable the
events being monitored, essentially turning 'top' into 'report', with
pressing CTRL+z again making it enable the events again, returning to
the 'top' behaviour, i.e. dynamic + decaying of older samples.

One may want, for instance, play with:

    -d, --delay <n>       number of seconds to delay between refreshes

and:

    -z, --zero            zero history across updates

Plus CTRL+z to see only the events since last zeroing, etc.

Suggested-by: Ingo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-zq7tnh5462blt2yda0bcxh5b@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-top.c
tools/perf/ui/browsers/hists.c