diff options
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); | |||
| 37 | #define FTRACE_MAX_EVENT \ | 37 | #define FTRACE_MAX_EVENT \ |
| 38 | ((1 << (sizeof(unsigned short) * 8)) - 1) | 38 | ((1 << (sizeof(unsigned short) * 8)) - 1) |
| 39 | 39 | ||
| 40 | struct event *events[FTRACE_MAX_EVENT]; | 40 | struct event_format *events[FTRACE_MAX_EVENT]; |
| 41 | 41 | ||
| 42 | #define MAX_FIELDS 64 | 42 | #define MAX_FIELDS 64 |
| 43 | #define N_COMMON_FIELDS 7 | 43 | #define N_COMMON_FIELDS 7 |
| @@ -136,7 +136,7 @@ static void define_field(enum print_arg_type field_type, | |||
| 136 | Py_DECREF(t); | 136 | Py_DECREF(t); |
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | static void define_event_symbols(struct event *event, | 139 | static void define_event_symbols(struct event_format *event, |
| 140 | const char *ev_name, | 140 | const char *ev_name, |
| 141 | struct print_arg *args) | 141 | struct print_arg *args) |
| 142 | { | 142 | { |
| @@ -178,6 +178,10 @@ static void define_event_symbols(struct event *event, | |||
| 178 | define_event_symbols(event, ev_name, args->op.right); | 178 | define_event_symbols(event, ev_name, args->op.right); |
| 179 | break; | 179 | break; |
| 180 | default: | 180 | default: |
| 181 | /* gcc warns for these? */ | ||
| 182 | case PRINT_BSTRING: | ||
| 183 | case PRINT_DYNAMIC_ARRAY: | ||
| 184 | case PRINT_FUNC: | ||
| 181 | /* we should warn... */ | 185 | /* we should warn... */ |
| 182 | return; | 186 | return; |
| 183 | } | 187 | } |
| @@ -186,10 +190,10 @@ static void define_event_symbols(struct event *event, | |||
| 186 | define_event_symbols(event, ev_name, args->next); | 190 | define_event_symbols(event, ev_name, args->next); |
| 187 | } | 191 | } |
| 188 | 192 | ||
| 189 | static inline struct event *find_cache_event(int type) | 193 | static inline struct event_format *find_cache_event(int type) |
| 190 | { | 194 | { |
| 191 | static char ev_name[256]; | 195 | static char ev_name[256]; |
| 192 | struct event *event; | 196 | struct event_format *event; |
| 193 | 197 | ||
| 194 | if (events[type]) | 198 | if (events[type]) |
| 195 | return events[type]; | 199 | return events[type]; |
| @@ -216,7 +220,7 @@ static void python_process_event(union perf_event *pevent __unused, | |||
| 216 | struct format_field *field; | 220 | struct format_field *field; |
| 217 | unsigned long long val; | 221 | unsigned long long val; |
| 218 | unsigned long s, ns; | 222 | unsigned long s, ns; |
| 219 | struct event *event; | 223 | struct event_format *event; |
| 220 | unsigned n = 0; | 224 | unsigned n = 0; |
| 221 | int type; | 225 | int type; |
| 222 | int pid; | 226 | int pid; |
| @@ -436,7 +440,7 @@ out: | |||
| 436 | 440 | ||
| 437 | static int python_generate_script(const char *outfile) | 441 | static int python_generate_script(const char *outfile) |
| 438 | { | 442 | { |
| 439 | struct event *event = NULL; | 443 | struct event_format *event = NULL; |
| 440 | struct format_field *f; | 444 | struct format_field *f; |
| 441 | char fname[PATH_MAX]; | 445 | char fname[PATH_MAX]; |
| 442 | int not_first, count; | 446 | int not_first, count; |
