diff options
67 files changed, 2118 insertions, 504 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index f2989c525e48..5a824e355d04 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
| @@ -174,7 +174,7 @@ static int cmdline_init(struct pevent *pevent) | |||
| 174 | return 0; | 174 | return 0; |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | static char *find_cmdline(struct pevent *pevent, int pid) | 177 | static const char *find_cmdline(struct pevent *pevent, int pid) |
| 178 | { | 178 | { |
| 179 | const struct cmdline *comm; | 179 | const struct cmdline *comm; |
| 180 | struct cmdline key; | 180 | struct cmdline key; |
| @@ -2637,7 +2637,7 @@ process_func_handler(struct event_format *event, struct pevent_function_handler | |||
| 2637 | struct print_arg *farg; | 2637 | struct print_arg *farg; |
| 2638 | enum event_type type; | 2638 | enum event_type type; |
| 2639 | char *token; | 2639 | char *token; |
| 2640 | char *test; | 2640 | const char *test; |
| 2641 | int i; | 2641 | int i; |
| 2642 | 2642 | ||
| 2643 | arg->type = PRINT_FUNC; | 2643 | arg->type = PRINT_FUNC; |
| @@ -3889,7 +3889,7 @@ static void print_mac_arg(struct trace_seq *s, int mac, void *data, int size, | |||
| 3889 | struct event_format *event, struct print_arg *arg) | 3889 | struct event_format *event, struct print_arg *arg) |
| 3890 | { | 3890 | { |
| 3891 | unsigned char *buf; | 3891 | unsigned char *buf; |
| 3892 | char *fmt = "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x"; | 3892 | const char *fmt = "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x"; |
| 3893 | 3893 | ||
| 3894 | if (arg->type == PRINT_FUNC) { | 3894 | if (arg->type == PRINT_FUNC) { |
| 3895 | process_defined_func(s, data, size, event, arg); | 3895 | process_defined_func(s, data, size, event, arg); |
| @@ -3931,7 +3931,8 @@ static int is_printable_array(char *p, unsigned int len) | |||
| 3931 | return 1; | 3931 | return 1; |
| 3932 | } | 3932 | } |
| 3933 | 3933 | ||
| 3934 | static void print_event_fields(struct trace_seq *s, void *data, int size, | 3934 | static void print_event_fields(struct trace_seq *s, void *data, |
| 3935 | int size __maybe_unused, | ||
| 3935 | struct event_format *event) | 3936 | struct event_format *event) |
| 3936 | { | 3937 | { |
| 3937 | struct format_field *field; | 3938 | struct format_field *field; |
| @@ -4408,7 +4409,7 @@ void pevent_event_info(struct trace_seq *s, struct event_format *event, | |||
| 4408 | void pevent_print_event(struct pevent *pevent, struct trace_seq *s, | 4409 | void pevent_print_event(struct pevent *pevent, struct trace_seq *s, |
| 4409 | struct pevent_record *record) | 4410 | struct pevent_record *record) |
| 4410 | { | 4411 | { |
| 4411 | static char *spaces = " "; /* 20 spaces */ | 4412 | static const char *spaces = " "; /* 20 spaces */ |
| 4412 | struct event_format *event; | 4413 | struct event_format *event; |
| 4413 | unsigned long secs; | 4414 | unsigned long secs; |
| 4414 | unsigned long usecs; | 4415 | unsigned long usecs; |
| @@ -5070,8 +5071,8 @@ static const char * const pevent_error_str[] = { | |||
| 5070 | }; | 5071 | }; |
| 5071 | #undef _PE | 5072 | #undef _PE |
| 5072 | 5073 | ||
| 5073 | int pevent_strerror(struct pevent *pevent, enum pevent_errno errnum, | 5074 | int pevent_strerror(struct pevent *pevent __maybe_unused, |
| 5074 | char *buf, size_t buflen) | 5075 | enum pevent_errno errnum, char *buf, size_t buflen) |
| 5075 | { | 5076 | { |
| 5076 | int idx; | 5077 | int idx; |
| 5077 | const char *msg; | 5078 | const char *msg; |
| @@ -5100,6 +5101,7 @@ int pevent_strerror(struct pevent *pevent, enum pevent_errno errnum, | |||
| 5100 | case PEVENT_ERRNO__READ_FORMAT_FAILED: | 5101 | case PEVENT_ERRNO__READ_FORMAT_FAILED: |
| 5101 | case PEVENT_ERRNO__READ_PRINT_FAILED: | 5102 | case PEVENT_ERRNO__READ_PRINT_FAILED: |
| 5102 | case PEVENT_ERRNO__OLD_FTRACE_ARG_FAILED: | 5103 | case PEVENT_ERRNO__OLD_FTRACE_ARG_FAILED: |
| 5104 | case PEVENT_ERRNO__INVALID_ARG_TYPE: | ||
| 5103 | snprintf(buf, buflen, "%s", msg); | 5105 | snprintf(buf, buflen, "%s", msg); |
| 5104 | break; | 5106 | break; |
| 5105 | 5107 | ||
| @@ -5362,7 +5364,7 @@ int pevent_register_print_function(struct pevent *pevent, | |||
| 5362 | if (type == PEVENT_FUNC_ARG_VOID) | 5364 | if (type == PEVENT_FUNC_ARG_VOID) |
| 5363 | break; | 5365 | break; |
