From aaf045f72335653b24784d6042be8e4aee114403 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Fri, 6 Apr 2012 00:47:56 +0200 Subject: perf: Have perf use the new libtraceevent.a library The event parsing code in perf was originally copied from trace-cmd but never was kept up-to-date with the changes that was done there. The trace-cmd libtraceevent.a code is much more mature than what is currently in perf. This updates the code to use wrappers to handle the calls to the new event parsing code. The new code requires a handle to be pass around, which removes the global event variables and allows more than one event structure to be read from different files (and different machines). But perf still has the old global events and the code throughout perf does not yet have a nice way to pass around a handle. A global 'pevent' has been made for perf and the old calls have been created as wrappers to the new event parsing code that uses the global pevent. With this change, perf can later incorporate the pevent handle into the perf structures and allow more than one file to be read and compared, that contains different events. Signed-off-by: Steven Rostedt Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Steven Rostedt Cc: Borislav Petkov Cc: Jiri Olsa Cc: Arun Sharma Cc: Namhyung Kim Signed-off-by: Frederic Weisbecker --- tools/perf/builtin-lock.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'tools/perf/builtin-lock.c') diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index 12c814838993..fd53319de20d 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c @@ -356,25 +356,25 @@ struct trace_release_event { struct trace_lock_handler { void (*acquire_event)(struct trace_acquire_event *, - struct event *, + struct event_format *, int cpu, u64 timestamp, struct thread *thread); void (*acquired_event)(struct trace_acquired_event *, - struct event *, + struct event_format *, int cpu, u64 timestamp, struct thread *thread); void (*contended_event)(struct trace_contended_event *, - struct event *, + struct event_format *, int cpu, u64 timestamp, struct thread *thread); void (*release_event)(struct trace_release_event *, - struct event *, + struct event_format *, int cpu, u64 timestamp, struct thread *thread); @@ -416,7 +416,7 @@ enum acquire_flags { static void report_lock_acquire_event(struct trace_acquire_event *acquire_event, - struct event *__event __used, + struct event_format *__event __used, int cpu __used, u64 timestamp __used, struct thread *thread __used) @@ -480,7 +480,7 @@ end: static void report_lock_acquired_event(struct trace_acquired_event *acquired_event, - struct event *__event __used, + struct event_format *__event __used, int cpu __used, u64 timestamp __used, struct thread *thread __used) @@ -536,7 +536,7 @@ end: static void report_lock_contended_event(struct trace_contended_event *contended_event, - struct event *__event __used, + struct event_format *__event __used, int cpu __used, u64 timestamp __used, struct thread *thread __used) @@ -583,7 +583,7 @@ end: static void report_lock_release_event(struct trace_release_event *release_event, - struct event *__event __used, + struct event_format *__event __used, int cpu __used, u64 timestamp __used, struct thread *thread __used) @@ -647,7 +647,7 @@ static struct trace_lock_handler *trace_handler; static void process_lock_acquire_event(void *data, - struct event *event __used, + struct event_format *event __used, int cpu __used, u64 timestamp __used, struct thread *thread __used) @@ -666,7 +666,7 @@ process_lock_acquire_event(void *data, static void process_lock_acquired_event(void *data, - struct event *event __used, + struct event_format *event __used, int cpu __used, u64 timestamp __used, struct thread *thread __used) @@ -684,7 +684,7 @@ process_lock_acquired_event(void *data, static void process_lock_contended_event(void *data, - struct event *event __used, + struct event_format *event __used, int cpu __used, u64 timestamp __used, struct thread *thread __used) @@ -702,7 +702,7 @@ process_lock_contended_event(void *data, static void process_lock_release_event(void *data, - struct event *event __used, + struct event_format *event __used, int cpu __used, u64 timestamp __used, struct thread *thread __used) @@ -721,7 +721,7 @@ process_lock_release_event(void *data, static void process_raw_event(void *data, int cpu, u64 timestamp, struct thread *thread) { - struct event *event; + struct event_format *event; int type; type = trace_parse_common_type(data); -- cgit v1.2.3