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>
This commit is contained in:
David Ahern 2011-03-09 22:23:23 -07:00 committed by Arnaldo Carvalho de Melo
parent cfd748ae06
commit be6d842a65
5 changed files with 41 additions and 22 deletions

View file

@ -204,9 +204,10 @@ static inline struct event *find_cache_event(int type)
return event;
}
static void python_process_event(int cpu, void *data,
int size __unused,
unsigned long long nsecs, char *comm)
static void python_process_event(union perf_event *pevent __unused,
struct perf_sample *sample,
struct perf_session *session __unused,
struct thread *thread)
{
PyObject *handler, *retval, *context, *t, *obj, *dict = NULL;
static char handler_name[256];
@ -217,6 +218,10 @@ static void python_process_event(int cpu, void *data,
unsigned n = 0;
int type;
int pid;
int cpu = sample->cpu;
void *data = sample->raw_data;
unsigned long long nsecs = sample->time;
char *comm = thread->comm;
t = PyTuple_New(MAX_FIELDS);
if (!t)