aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2013-12-19 14:34:52 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-12-19 14:34:52 -0500
commitb7fff6b5f977115be1757f18b1aca928803b1e17 (patch)
tree8dd71759f6bae0f3c54ad4b658f34be54305598c /tools/perf/util/scripting-engines/trace-event-python.c
parent3184c47cb8b04b8bb5c1005168049519b066bcd1 (diff)
perf scripting python: Shorten function signatures
Removing unused parameters. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> 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-fspmnjadohrik8uvhytyu8lp@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
-rw-r--r--tools/perf/util/scripting-engines/trace-event-python.c26
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
234static void python_process_tracepoint(union perf_event *perf_event 234static 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
354static void python_process_general_event(union perf_event *perf_event 351static 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
414static void python_process_event(union perf_event *perf_event, 408static 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