mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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:
parent
cfd748ae06
commit
be6d842a65
5 changed files with 41 additions and 22 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue