diff options
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
-rw-r--r-- | tools/perf/util/scripting-engines/trace-event-python.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c index 53c20e7fd900..fc007926eb1c 100644 --- a/tools/perf/util/scripting-engines/trace-event-python.c +++ b/tools/perf/util/scripting-engines/trace-event-python.c | |||
@@ -231,13 +231,10 @@ static inline struct event_format *find_cache_event(struct perf_evsel *evsel) | |||
231 | return event; | 231 | return event; |
232 | } | 232 | } |
233 | 233 | ||
234 | static void python_process_tracepoint(union perf_event *perf_event | 234 | static void python_process_tracepoint(struct perf_sample *sample, |
235 | __maybe_unused, | 235 | struct perf_evsel *evsel, |
236 | struct perf_sample *sample, | 236 | struct thread *thread, |
237 | struct perf_evsel *evsel, | 237 | struct addr_location *al) |
238 | struct machine *machine __maybe_unused, | ||
239 | struct thread *thread, | ||
240 | struct addr_location *al) | ||
241 | { | 238 | { |
242 | PyObject *handler, *retval, *context, *t, *obj, *dict = NULL; | 239 | PyObject *handler, *retval, *context, *t, *obj, *dict = NULL; |
243 | static char handler_name[256]; | 240 | static char handler_name[256]; |
@@ -351,11 +348,8 @@ static void python_process_tracepoint(union perf_event *perf_event | |||
351 | Py_DECREF(t); | 348 | Py_DECREF(t); |
352 | } | 349 | } |
353 | 350 | ||
354 | static void python_process_general_event(union perf_event *perf_event | 351 | static void python_process_general_event(struct perf_sample *sample, |
355 | __maybe_unused, | ||
356 | struct perf_sample *sample, | ||
357 | struct perf_evsel *evsel, | 352 | struct perf_evsel *evsel, |
358 | struct machine *machine __maybe_unused, | ||
359 | struct thread *thread, | 353 | struct thread *thread, |
360 | struct addr_location *al) | 354 | struct addr_location *al) |
361 | { | 355 | { |
@@ -411,22 +405,20 @@ exit: | |||
411 | Py_DECREF(t); | 405 | Py_DECREF(t); |
412 | } | 406 | } |
413 | 407 | ||
414 | static void python_process_event(union perf_event *perf_event, | 408 | static void python_process_event(union perf_event *event __maybe_unused, |
415 | struct perf_sample *sample, | 409 | struct perf_sample *sample, |
416 | struct perf_evsel *evsel, | 410 | struct perf_evsel *evsel, |
417 | struct machine *machine, | 411 | struct machine *machine __maybe_unused, |
418 | struct thread *thread, | 412 | struct thread *thread, |
419 | struct addr_location *al) | 413 | struct addr_location *al) |
420 | { | 414 | { |
421 | switch (evsel->attr.type) { | 415 | switch (evsel->attr.type) { |
422 | case PERF_TYPE_TRACEPOINT: | 416 | case PERF_TYPE_TRACEPOINT: |
423 | python_process_tracepoint(perf_event, sample, evsel, | 417 | python_process_tracepoint(sample, evsel, thread, al); |
424 | machine, thread, al); | ||
425 | break; | 418 | break; |
426 | /* Reserve for future process_hw/sw/raw APIs */ | 419 | /* Reserve for future process_hw/sw/raw APIs */ |
427 | default: | 420 | default: |
428 | python_process_general_event(perf_event, sample, evsel, | 421 | python_process_general_event(sample, evsel, thread, al); |
429 | machine, thread, al); | ||
430 | } | 422 | } |
431 | } | 423 | } |
432 | 424 | ||