diff options
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
-rw-r--r-- | tools/perf/util/scripting-engines/trace-event-perl.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c index b059dc50cc2d..74350ffb57fe 100644 --- a/tools/perf/util/scripting-engines/trace-event-perl.c +++ b/tools/perf/util/scripting-engines/trace-event-perl.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * trace-event-perl. Feed perf trace events to an embedded Perl interpreter. | 2 | * trace-event-perl. Feed perf script events to an embedded Perl interpreter. |
3 | * | 3 | * |
4 | * Copyright (C) 2009 Tom Zanussi <tzanussi@gmail.com> | 4 | * Copyright (C) 2009 Tom Zanussi <tzanussi@gmail.com> |
5 | * | 5 | * |
@@ -245,9 +245,11 @@ 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_evsel *evsel, |
251 | struct perf_session *session __unused, | ||
252 | struct thread *thread) | ||
251 | { | 253 | { |
252 | struct format_field *field; | 254 | struct format_field *field; |
253 | static char handler[256]; | 255 | static char handler[256]; |
@@ -256,6 +258,10 @@ static void perl_process_event(int cpu, void *data, | |||
256 | struct event *event; | 258 | struct event *event; |
257 | int type; | 259 | int type; |
258 | int pid; | 260 | int pid; |
261 | int cpu = sample->cpu; | ||
262 | void *data = sample->raw_data; | ||
263 | unsigned long long nsecs = sample->time; | ||
264 | char *comm = thread->comm; | ||
259 | 265 | ||
260 | dSP; | 266 | dSP; |
261 | 267 | ||
@@ -411,8 +417,8 @@ static int perl_generate_script(const char *outfile) | |||
411 | return -1; | 417 | return -1; |
412 | } | 418 | } |
413 | 419 | ||
414 | fprintf(ofp, "# perf trace event handlers, " | 420 | fprintf(ofp, "# perf script event handlers, " |
415 | "generated by perf trace -g perl\n"); | 421 | "generated by perf script -g perl\n"); |
416 | 422 | ||
417 | fprintf(ofp, "# Licensed under the terms of the GNU GPL" | 423 | fprintf(ofp, "# Licensed under the terms of the GNU GPL" |
418 | " License version 2\n\n"); | 424 | " License version 2\n\n"); |