perf evlist: Add 'system_wide' option
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 31 Jul 2014 06:00:51 +0000 (09:00 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 13 Aug 2014 22:21:18 +0000 (19:21 -0300)
commitbf8e8f4b832972c76d64ab2e2837a48397144887
tree55b1b99106fe3bbb4362ac1ec80666b3ab2fbb57
parentf247fb8191aa7f10d3f6c987e8ef0853ae789a02
perf evlist: Add 'system_wide' option

Add an option to cause a selected event to be opened always without a
pid when configured by perf_evsel__config().

This is needed when using the sched_switch tracepoint to follow object
code execution.

sched_switch occurs before the task switch and so it cannot record it in
a context limited to that task.  Note that also means that sched_switch
is useless when capturing data per-thread, as is the 'context-switches'
software event for the same reason.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1406786474-9306-9-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evlist.c
tools/perf/util/evsel.c
tools/perf/util/evsel.h