diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-11-28 04:56:39 -0500 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-11-28 07:39:12 -0500 |
| commit | 743eb868657bdb1b26c7b24077ca21c67c82c777 (patch) | |
| tree | 4803b557725213043ccd5d3f83d2eec796a49f69 /tools/perf/util/scripting-engines | |
| parent | d20deb64e0490ee9442b5181bc08a62d2cadcb90 (diff) | |
perf tools: Resolve machine earlier and pass it to perf_event_ops
Reducing the exposure of perf_session further, so that we can use the
classes in cases where no perf.data file is created.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-stua66dcscsezzrcdugvbmvd@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/scripting-engines')
| -rw-r--r-- | tools/perf/util/scripting-engines/trace-event-perl.c | 4 | ||||
| -rw-r--r-- | tools/perf/util/scripting-engines/trace-event-python.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c index 74350ffb57fe..a82ce4303ff5 100644 --- a/tools/perf/util/scripting-engines/trace-event-perl.c +++ b/tools/perf/util/scripting-engines/trace-event-perl.c | |||
| @@ -27,6 +27,8 @@ | |||
| 27 | 27 | ||
| 28 | #include "../../perf.h" | 28 | #include "../../perf.h" |
| 29 | #include "../util.h" | 29 | #include "../util.h" |
| 30 | #include "../thread.h" | ||
| 31 | #include "../event.h" | ||
| 30 | #include "../trace-event.h" | 32 | #include "../trace-event.h" |
| 31 | 33 | ||
| 32 | #include <EXTERN.h> | 34 | #include <EXTERN.h> |
| @@ -248,7 +250,7 @@ static inline struct event *find_cache_event(int type) | |||
| 248 | static void perl_process_event(union perf_event *pevent __unused, | 250 | static void perl_process_event(union perf_event *pevent __unused, |
| 249 | struct perf_sample *sample, | 251 | struct perf_sample *sample, |
| 250 | struct perf_evsel *evsel, | 252 | struct perf_evsel *evsel, |
| 251 | struct perf_session *session __unused, | 253 | struct machine *machine __unused, |
| 252 | struct thread *thread) | 254 | struct thread *thread) |
| 253 | { | 255 | { |
| 254 | struct format_field *field; | 256 | struct format_field *field; |
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c index 6ccf70e8d8f2..0b2a48783172 100644 --- a/tools/perf/util/scripting-engines/trace-event-python.c +++ b/tools/perf/util/scripting-engines/trace-event-python.c | |||
| @@ -29,6 +29,8 @@ | |||
| 29 | 29 | ||
| 30 | #include "../../perf.h" | 30 | #include "../../perf.h" |
| 31 | #include "../util.h" | 31 | #include "../util.h" |
| 32 | #include "../event.h" | ||
| 33 | #include "../thread.h" | ||
| 32 | #include "../trace-event.h" | 34 | #include "../trace-event.h" |
| 33 | 35 | ||
| 34 | PyMODINIT_FUNC initperf_trace_context(void); | 36 | PyMODINIT_FUNC initperf_trace_context(void); |
| @@ -207,7 +209,7 @@ static inline struct event *find_cache_event(int type) | |||
| 207 | static void python_process_event(union perf_event *pevent __unused, | 209 | static void python_process_event(union perf_event *pevent __unused, |
| 208 | struct perf_sample *sample, | 210 | struct perf_sample *sample, |
| 209 | struct perf_evsel *evsel __unused, | 211 | struct perf_evsel *evsel __unused, |
| 210 | struct perf_session *session __unused, | 212 | struct machine *machine __unused, |
| 211 | struct thread *thread) | 213 | struct thread *thread) |
| 212 | { | 214 | { |
| 213 | PyObject *handler, *retval, *context, *t, *obj, *dict = NULL; | 215 | PyObject *handler, *retval, *context, *t, *obj, *dict = NULL; |
