aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorDavid Ahern <daahern@cisco.com>2011-03-10 00:23:23 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-03-14 16:05:50 -0400
commitbe6d842a65babc54e2b204b382df2529e304be48 (patch)
treed8f3c9fb9f1457dcfa782102d2b27e0212bad009 /tools/perf/util/scripting-engines/trace-event-python.c
parentcfd748ae066e776d45bdce550b47cd00c67d55de (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-python.c')
-rw-r--r--tools/perf/util/scripting-engines/trace-event-python.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index 2040b853852..1b85d605515 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -204,9 +204,10 @@ static inline struct event *find_cache_event(int type)
204 return event; 204 return event;
205} 205}
206 206
207static void python_process_event(int cpu, void *data, 207static void python_process_event(union perf_event *pevent __unused,
208 int size __unused, 208 struct perf_sample *sample,
209 unsigned long long nsecs, char *comm) 209 struct perf_session *session __unused,
210 struct thread *thread)
210{ 211{
211 PyObject *handler, *retval, *context, *t, *obj, *dict = NULL; 212 PyObject *handler, *retval, *context, *t, *obj, *dict = NULL;
212 static char handler_name[256]; 213 static char handler_name[256];
@@ -217,6 +218,10 @@ static void python_process_event(int cpu, void *data,
217 unsigned n = 0; 218 unsigned n = 0;
218 int type; 219 int type;
219 int pid; 220 int pid;
221 int cpu = sample->cpu;
222 void *data = sample->raw_data;
223 unsigned long long nsecs = sample->time;
224 char *comm = thread->comm;
220 225
221 t = PyTuple_New(MAX_FIELDS); 226 t = PyTuple_New(MAX_FIELDS);
222 if (!t) 227 if (!t)