diff options
author | David Ahern <daahern@cisco.com> | 2011-03-10 00:23:23 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-03-14 16:05:50 -0400 |
commit | be6d842a65babc54e2b204b382df2529e304be48 (patch) | |
tree | d8f3c9fb9f1457dcfa782102d2b27e0212bad009 /tools/perf/util/scripting-engines/trace-event-perl.c | |
parent | cfd748ae066e776d45bdce550b47cd00c67d55de (diff) |
perf script: Change process_event prototype
Prepare for handling of samples for any event type.
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <1299734608-5223-2-git-send-email-daahern@cisco.com>
Signed-off-by: David Ahern <daahern@cisco.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
-rw-r--r-- | tools/perf/util/scripting-engines/trace-event-perl.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c index 93680818e24..621427212e8 100644 --- a/tools/perf/util/scripting-engines/trace-event-perl.c +++ b/tools/perf/util/scripting-engines/trace-event-perl.c | |||
@@ -245,9 +245,10 @@ static inline struct event *find_cache_event(int type) | |||
245 | return event; | 245 | return event; |
246 | } | 246 | } |
247 | 247 | ||
248 | static void perl_process_event(int cpu, void *data, | 248 | static void perl_process_event(union perf_event *pevent __unused, |
249 | int size __unused, | 249 | struct perf_sample *sample, |
250 | unsigned long long nsecs, char *comm) | 250 | struct perf_session *session __unused, |
251 | struct thread *thread) | ||
251 | { | 252 | { |
252 | struct format_field *field; | 253 | struct format_field *field; |
253 | static char handler[256]; | 254 | static char handler[256]; |
@@ -256,6 +257,10 @@ static void perl_process_event(int cpu, void *data, | |||
256 | struct event *event; | 257 | struct event *event; |
257 | int type; | 258 | int type; |
258 | int pid; | 259 | int pid; |
260 | int cpu = sample->cpu; | ||
261 | void *data = sample->raw_data; | ||
262 | unsigned long long nsecs = sample->time; | ||
263 | char *comm = thread->comm; | ||
259 | 264 | ||
260 | dSP; | 265 | dSP; |
261 | 266 | ||