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 | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c index c26628116593..52580d09d75c 100644 --- a/tools/perf/util/scripting-engines/trace-event-perl.c +++ b/tools/perf/util/scripting-engines/trace-event-perl.c | |||
@@ -258,7 +258,6 @@ static inline struct event_format *find_cache_event(struct perf_evsel *evsel) | |||
258 | } | 258 | } |
259 | 259 | ||
260 | static void perl_process_tracepoint(union perf_event *perf_event __unused, | 260 | static void perl_process_tracepoint(union perf_event *perf_event __unused, |
261 | struct pevent *pevent, | ||
262 | struct perf_sample *sample, | 261 | struct perf_sample *sample, |
263 | struct perf_evsel *evsel, | 262 | struct perf_evsel *evsel, |
264 | struct machine *machine __unused, | 263 | struct machine *machine __unused, |
@@ -284,7 +283,7 @@ static void perl_process_tracepoint(union perf_event *perf_event __unused, | |||
284 | if (!event) | 283 | if (!event) |
285 | die("ug! no event found for type %d", evsel->attr.config); | 284 | die("ug! no event found for type %d", evsel->attr.config); |
286 | 285 | ||
287 | pid = trace_parse_common_pid(pevent, data); | 286 | pid = raw_field_value(event, "common_pid", data); |
288 | 287 | ||
289 | sprintf(handler, "%s::%s", event->system, event->name); | 288 | sprintf(handler, "%s::%s", event->system, event->name); |
290 | 289 | ||
@@ -317,7 +316,7 @@ static void perl_process_tracepoint(union perf_event *perf_event __unused, | |||
317 | offset = field->offset; | 316 | offset = field->offset; |
318 | XPUSHs(sv_2mortal(newSVpv((char *)data + offset, 0))); | 317 | XPUSHs(sv_2mortal(newSVpv((char *)data + offset, 0))); |
319 | } else { /* FIELD_IS_NUMERIC */ | 318 | } else { /* FIELD_IS_NUMERIC */ |
320 | val = read_size(pevent, data + field->offset, | 319 | val = read_size(event, data + field->offset, |
321 | field->size); | 320 | field->size); |
322 | if (field->flags & FIELD_IS_SIGNED) { | 321 | if (field->flags & FIELD_IS_SIGNED) { |
323 | XPUSHs(sv_2mortal(newSViv(val))); | 322 | XPUSHs(sv_2mortal(newSViv(val))); |
@@ -346,9 +345,9 @@ static void perl_process_tracepoint(union perf_event *perf_event __unused, | |||
346 | LEAVE; | 345 | LEAVE; |
347 | } | 346 | } |
348 | 347 | ||
349 | static void perl_process_event_generic(union perf_event *pevent __unused, | 348 | static void perl_process_event_generic(union perf_event *event, |
350 | struct perf_sample *sample, | 349 | struct perf_sample *sample, |
351 | struct perf_evsel *evsel __unused, | 350 | struct perf_evsel *evsel, |
352 | struct machine *machine __unused, | 351 | struct machine *machine __unused, |
353 | struct thread *thread __unused) | 352 | struct thread *thread __unused) |
354 | { | 353 | { |
@@ -360,7 +359,7 @@ static void perl_process_event_generic(union perf_event *pevent __unused, | |||
360 | ENTER; | 359 | ENTER; |
361 | SAVETMPS; | 360 | SAVETMPS; |
362 | PUSHMARK(SP); | 361 | PUSHMARK(SP); |
363 | XPUSHs(sv_2mortal(newSVpvn((const char *)pevent, pevent->header.size))); | 362 | XPUSHs(sv_2mortal(newSVpvn((const char *)event, event->header.size))); |
364 | XPUSHs(sv_2mortal(newSVpvn((const char *)&evsel->attr, sizeof(evsel->attr)))); | 363 | XPUSHs(sv_2mortal(newSVpvn((const char *)&evsel->attr, sizeof(evsel->attr)))); |
365 | XPUSHs(sv_2mortal(newSVpvn((const char *)sample, sizeof(*sample)))); | 364 | XPUSHs(sv_2mortal(newSVpvn((const char *)sample, sizeof(*sample)))); |
366 | XPUSHs(sv_2mortal(newSVpvn((const char *)sample->raw_data, sample->raw_size))); | 365 | XPUSHs(sv_2mortal(newSVpvn((const char *)sample->raw_data, sample->raw_size))); |
@@ -373,13 +372,12 @@ static void perl_process_event_generic(union perf_event *pevent __unused, | |||
373 | } | 372 | } |
374 | 373 | ||
375 | static void perl_process_event(union perf_event *event, | 374 | static void perl_process_event(union perf_event *event, |
376 | struct pevent *pevent, | ||
377 | struct perf_sample *sample, | 375 | struct perf_sample *sample, |
378 | struct perf_evsel *evsel, | 376 | struct perf_evsel *evsel, |
379 | struct machine *machine, | 377 | struct machine *machine, |
380 | struct thread *thread) | 378 | struct thread *thread) |
381 | { | 379 | { |
382 | perl_process_tracepoint(event, pevent, sample, evsel, machine, thread); | 380 | perl_process_tracepoint(event, sample, evsel, machine, thread); |
383 | perl_process_event_generic(event, sample, evsel, machine, thread); | 381 | perl_process_event_generic(event, sample, evsel, machine, thread); |
384 | } | 382 | } |
385 | 383 | ||