diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-05-21 12:42:09 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-05-21 12:42:09 +0400 |
commit | 73787190d04a34e6da745da893b3ae8bedde418f (patch) | |
tree | bc1046eb1864237741898992673f17c577b83929 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 6f5e3577d47aeb4ef39683cbf9e201554bc7054d (diff) | |
parent | 1c698186abf5caaea06fda66590f6a0e0a21628d (diff) | |
download | linux-73787190d04a34e6da745da893b3ae8bedde418f.tar.xz |
Merge branch 'perf/parse-events-4' of git://github.com/fweisbec/tracing into perf/core
Conflicts:
tools/perf/Makefile
This tree from Frederic unifies the perf and trace-cmd trace event format
parsing code into a single library.
Powertop and other tools will also be able to make use of it.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
-rw-r--r-- | tools/perf/util/scripting-engines/trace-event-python.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c index c2623c6f9b51..acb9795286c4 100644 --- a/tools/perf/util/scripting-engines/trace-event-python.c +++ b/tools/perf/util/scripting-engines/trace-event-python.c @@ -37,7 +37,7 @@ PyMODINIT_FUNC initperf_trace_context(void); #define FTRACE_MAX_EVENT \ ((1 << (sizeof(unsigned short) * 8)) - 1) -struct event *events[FTRACE_MAX_EVENT]; +struct event_format *events[FTRACE_MAX_EVENT]; #define MAX_FIELDS 64 #define N_COMMON_FIELDS 7 @@ -136,7 +136,7 @@ static void define_field(enum print_arg_type field_type, Py_DECREF(t); } -static void define_event_symbols(struct event *event, +static void define_event_symbols(struct event_format *event, const char *ev_name, struct print_arg *args) { @@ -178,6 +178,10 @@ static void define_event_symbols(struct event *event, define_event_symbols(event, ev_name, args->op.right); break; default: + /* gcc warns for these? */ + case PRINT_BSTRING: + case PRINT_DYNAMIC_ARRAY: + case PRINT_FUNC: /* we should warn... */ return; } @@ -186,10 +190,10 @@ static void define_event_symbols(struct event *event, define_event_symbols(event, ev_name, args->next); } -static inline struct event *find_cache_event(int type) +static inline struct event_format *find_cache_event(int type) { static char ev_name[256]; - struct event *event; + struct event_format *event; if (events[type]) return events[type]; @@ -216,7 +220,7 @@ static void python_process_event(union perf_event *pevent __unused, struct format_field *field; unsigned long long val; unsigned long s, ns; - struct event *event; + struct event_format *event; unsigned n = 0; int type; int pid; @@ -436,7 +440,7 @@ out: static int python_generate_script(const char *outfile) { - struct event *event = NULL; + struct event_format *event = NULL; struct format_field *f; char fname[PATH_MAX]; int not_first, count; |