perf script: Implement option for system-wide profiling
authorRobert Richter <robert.richter@amd.com>
Fri, 25 Nov 2011 14:05:25 +0000 (15:05 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 12 Dec 2011 10:44:00 +0000 (08:44 -0200)
commit317df650c588bb9091b1fa0b5d726fe485aad88e
tree64de022f7bce1c948e316c88fc67b8b543d56616
parent38efb539c13f8f173e381435cdd40463ab5d38de
perf script: Implement option for system-wide profiling

The option is documented in man perf-script but was not yet implemented:

       -a
           Force system-wide collection. Scripts run without a
           <command> normally use -a by default, while scripts run
           with a <command> normally don't - this option allows the
           latter to be run in system-wide mode.

As with perf record you now can profile in system-wide mode for the
runtime of a given command, e.g.:

 # perf script -a syscall-counts sleep 2

Cc: Ingo Molnar <mingo@elte.hu>
Link: http://lkml.kernel.org/r/1322229925-10075-1-git-send-email-robert.richter@amd.com
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-script.c