diff options
Diffstat (limited to 'tools/lib/traceevent/event-parse.c')
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 1696dd9534bc..a651c3323f2c 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -1382,7 +1382,7 @@ static int event_read_fields(struct tep_event_format *event, struct tep_format_f | |||
1382 | * The ftrace fields may still use the "special" name. | 1382 | * The ftrace fields may still use the "special" name. |
1383 | * Just ignore it. | 1383 | * Just ignore it. |
1384 | */ | 1384 | */ |
1385 | if (event->flags & EVENT_FL_ISFTRACE && | 1385 | if (event->flags & TEP_EVENT_FL_ISFTRACE && |
1386 | type == TEP_EVENT_ITEM && strcmp(token, "special") == 0) { | 1386 | type == TEP_EVENT_ITEM && strcmp(token, "special") == 0) { |
1387 | free_token(token); | 1387 | free_token(token); |
1388 | type = read_token(&token); | 1388 | type = read_token(&token); |
@@ -1412,7 +1412,7 @@ static int event_read_fields(struct tep_event_format *event, struct tep_format_f | |||
1412 | * Some of the ftrace fields are broken and have | 1412 | * Some of the ftrace fields are broken and have |
1413 | * an illegal "." in them. | 1413 | * an illegal "." in them. |
1414 | */ | 1414 | */ |
1415 | (event->flags & EVENT_FL_ISFTRACE && | 1415 | (event->flags & TEP_EVENT_FL_ISFTRACE && |
1416 | type == TEP_EVENT_OP && strcmp(token, ".") == 0)) { | 1416 | type == TEP_EVENT_OP && strcmp(token, ".") == 0)) { |
1417 | 1417 | ||
1418 | if (strcmp(token, "*") == 0) | 1418 | if (strcmp(token, "*") == 0) |
@@ -1963,7 +1963,7 @@ process_op(struct tep_event_format *event, struct print_arg *arg, char **tok) | |||
1963 | arg->op.right = NULL; | 1963 | arg->op.right = NULL; |
1964 | 1964 | ||
1965 | if (set_op_prio(arg) == -1) { | 1965 | if (set_op_prio(arg) == -1) { |
1966 | event->flags |= EVENT_FL_FAILED; | 1966 | event->flags |= TEP_EVENT_FL_FAILED; |
1967 | /* arg->op.op (= token) will be freed at out_free */ | 1967 | /* arg->op.op (= token) will be freed at out_free */ |
1968 | arg->op.op = NULL; | 1968 | arg->op.op = NULL; |
1969 | goto out_free; | 1969 | goto out_free; |
@@ -2042,7 +2042,7 @@ process_op(struct tep_event_format *event, struct print_arg *arg, char **tok) | |||
2042 | 2042 | ||
2043 | } else { | 2043 | } else { |
2044 | do_warning_event(event, "unknown op '%s'", token); | 2044 | do_warning_event(event, "unknown op '%s'", token); |
2045 | event->flags |= EVENT_FL_FAILED; | 2045 | event->flags |= TEP_EVENT_FL_FAILED; |
2046 | /* the arg is now the left side */ | 2046 | /* the arg is now the left side */ |
2047 | goto out_free; | 2047 | goto out_free; |
2048 | } | 2048 | } |
@@ -4884,13 +4884,13 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e | |||
4884 | int len; | 4884 | int len; |
4885 | int ls; | 4885 | int ls; |
4886 | 4886 | ||
4887 | if (event->flags & EVENT_FL_FAILED) { | 4887 | if (event->flags & TEP_EVENT_FL_FAILED) { |
4888 | trace_seq_printf(s, "[FAILED TO PARSE]"); | 4888 | trace_seq_printf(s, "[FAILED TO PARSE]"); |
4889 | tep_print_fields(s, data, size, event); | 4889 | tep_print_fields(s, data, size, event); |
4890 | return; | 4890 | return; |
4891 | } | 4891 | } |
4892 | 4892 | ||
4893 | if (event->flags & EVENT_FL_ISBPRINT) { | 4893 | if (event->flags & TEP_EVENT_FL_ISBPRINT) { |
4894 | bprint_fmt = get_bprint_format(data, size, event); | 4894 | bprint_fmt = get_bprint_format(data, size, event); |
4895 | args = make_bprint_args(bprint_fmt, data, size, event); | 4895 | args = make_bprint_args(bprint_fmt, data, size, event); |
4896 | arg = args; | 4896 | arg = args; |
@@ -4945,7 +4945,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e | |||
4945 | /* The argument is the length. */ | 4945 | /* The argument is the length. */ |
4946 | if (!arg) { | 4946 | if (!arg) { |
4947 | do_warning_event(event, "no argument match"); | 4947 | do_warning_event(event, "no argument match"); |
4948 | event->flags |= EVENT_FL_FAILED; | 4948 | event->flags |= TEP_EVENT_FL_FAILED; |
4949 | goto out_failed; | 4949 | goto out_failed; |
4950 | } | 4950 | } |
4951 | len_arg = eval_num_arg(data, size, event, arg); | 4951 | len_arg = eval_num_arg(data, size, event, arg); |
@@ -4998,7 +4998,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e | |||
4998 | case 'u': | 4998 | case 'u': |
4999 | if (!arg) { | 4999 | if (!arg) { |
5000 | do_warning_event(event, "no argument match"); | 5000 | do_warning_event(event, "no argument match"); |
5001 | event->flags |= EVENT_FL_FAILED; | 5001 | event->flags |= TEP_EVENT_FL_FAILED; |
5002 | goto out_failed; | 5002 | goto out_failed; |
5003 | } | 5003 | } |
5004 | 5004 | ||
@@ -5008,7 +5008,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e | |||
5008 | /* should never happen */ | 5008 | /* should never happen */ |
5009 | if (len > 31) { | 5009 | if (len > 31) { |
5010 | do_warning_event(event, "bad format!"); | 5010 | do_warning_event(event, "bad format!"); |
5011 | event->flags |= EVENT_FL_FAILED; | 5011 | event->flags |= TEP_EVENT_FL_FAILED; |
5012 | len = 31; | 5012 | len = 31; |
5013 | } | 5013 | } |
5014 | 5014 | ||
@@ -5074,13 +5074,13 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e | |||
5074 | break; | 5074 | break; |
5075 | default: | 5075 | default: |
5076 | do_warning_event(event, "bad count (%d)", ls); | 5076 | do_warning_event(event, "bad count (%d)", ls); |
5077 | event->flags |= EVENT_FL_FAILED; | 5077 | event->flags |= TEP_EVENT_FL_FAILED; |
5078 | } | 5078 | } |
5079 | break; | 5079 | break; |
5080 | case 's': | 5080 | case 's': |
5081 | if (!arg) { | 5081 | if (!arg) { |
5082 | do_warning_event(event, "no matching argument"); | 5082 | do_warning_event(event, "no matching argument"); |
5083 | event->flags |= EVENT_FL_FAILED; | 5083 | event->flags |= TEP_EVENT_FL_FAILED; |
5084 | goto out_failed; | 5084 | goto out_failed; |
5085 | } | 5085 | } |
5086 | 5086 | ||
@@ -5090,7 +5090,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e | |||
5090 | /* should never happen */ | 5090 | /* should never happen */ |
5091 | if (len > 31) { | 5091 | if (len > 31) { |
5092 | do_warning_event(event, "bad format!"); | 5092 | do_warning_event(event, "bad format!"); |
5093 | event->flags |= EVENT_FL_FAILED; | 5093 | event->flags |= TEP_EVENT_FL_FAILED; |
5094 | len = 31; | 5094 | len = 31; |
5095 | } | 5095 | } |
5096 | 5096 | ||
@@ -5115,7 +5115,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e | |||
5115 | trace_seq_putc(s, *ptr); | 5115 | trace_seq_putc(s, *ptr); |
5116 | } | 5116 | } |
5117 | 5117 | ||
5118 | if (event->flags & EVENT_FL_FAILED) { | 5118 | if (event->flags & TEP_EVENT_FL_FAILED) { |
5119 | out_failed: | 5119 | out_failed: |
5120 | trace_seq_printf(s, "[FAILED TO PARSE]"); | 5120 | trace_seq_printf(s, "[FAILED TO PARSE]"); |
5121 | } | 5121 | } |
@@ -5391,11 +5391,11 @@ void tep_event_info(struct trace_seq *s, struct tep_event_format *event, | |||
5391 | { | 5391 | { |
5392 | int print_pretty = 1; | 5392 | int print_pretty = 1; |
5393 | 5393 | ||
5394 | if (event->pevent->print_raw || (event->flags & EVENT_FL_PRINTRAW)) | 5394 | if (event->pevent->print_raw || (event->flags & TEP_EVENT_FL_PRINTRAW)) |
5395 | tep_print_fields(s, record->data, record->size, event); | 5395 | tep_print_fields(s, record->data, record->size, event); |
5396 | else { | 5396 | else { |
5397 | 5397 | ||
5398 | if (event->handler && !(event->flags & EVENT_FL_NOHANDLE)) | 5398 | if (event->handler && !(event->flags & TEP_EVENT_FL_NOHANDLE)) |
5399 | print_pretty = event->handler(s, record, event, | 5399 | print_pretty = event->handler(s, record, event, |
5400 | event->context); | 5400 | event->context); |
5401 | 5401 | ||
@@ -6043,10 +6043,10 @@ enum tep_errno __tep_parse_format(struct tep_event_format **eventp, | |||
6043 | } | 6043 | } |
6044 | 6044 | ||
6045 | if (strcmp(sys, "ftrace") == 0) { | 6045 | if (strcmp(sys, "ftrace") == 0) { |
6046 | event->flags |= EVENT_FL_ISFTRACE; | 6046 | event->flags |= TEP_EVENT_FL_ISFTRACE; |
6047 | 6047 | ||
6048 | if (strcmp(event->name, "bprint") == 0) | 6048 | if (strcmp(event->name, "bprint") == 0) |
6049 | event->flags |= EVENT_FL_ISBPRINT; | 6049 | event->flags |= TEP_EVENT_FL_ISBPRINT; |
6050 | } | 6050 | } |
6051 | 6051 | ||
6052 | event->id = event_read_id(); | 6052 | event->id = event_read_id(); |
@@ -6089,7 +6089,7 @@ enum tep_errno __tep_parse_format(struct tep_event_format **eventp, | |||
6089 | goto event_parse_failed; | 6089 | goto event_parse_failed; |
6090 | } | 6090 | } |
6091 | 6091 | ||
6092 | if (!ret && (event->flags & EVENT_FL_ISFTRACE)) { | 6092 | if (!ret && (event->flags & TEP_EVENT_FL_ISFTRACE)) { |
6093 | struct tep_format_field *field; | 6093 | struct tep_format_field *field; |
6094 | struct print_arg *arg, **list; | 6094 | struct print_arg *arg, **list; |
6095 | 6095 | ||
@@ -6098,13 +6098,13 @@ enum tep_errno __tep_parse_format(struct tep_event_format **eventp, | |||
6098 | for (field = event->format.fields; field; field = field->next) { | 6098 | for (field = event->format.fields; field; field = field->next) { |
6099 | arg = alloc_arg(); | 6099 | arg = alloc_arg(); |
6100 | if (!arg) { | 6100 | if (!arg) { |
6101 | event->flags |= EVENT_FL_FAILED; | 6101 | event->flags |= TEP_EVENT_FL_FAILED; |
6102 | return TEP_ERRNO__OLD_FTRACE_ARG_FAILED; | 6102 | return TEP_ERRNO__OLD_FTRACE_ARG_FAILED; |
6103 | } | 6103 | } |
6104 | arg->type = PRINT_FIELD; | 6104 | arg->type = PRINT_FIELD; |
6105 | arg->field.name = strdup(field->name); | 6105 | arg->field.name = strdup(field->name); |
6106 | if (!arg->field.name) { | 6106 | if (!arg->field.name) { |
6107 | event->flags |= EVENT_FL_FAILED; | 6107 | event->flags |= TEP_EVENT_FL_FAILED; |
6108 | free_arg(arg); | 6108 | free_arg(arg); |
6109 | return TEP_ERRNO__OLD_FTRACE_ARG_FAILED; | 6109 | return TEP_ERRNO__OLD_FTRACE_ARG_FAILED; |
6110 | } | 6110 | } |
@@ -6118,7 +6118,7 @@ enum tep_errno __tep_parse_format(struct tep_event_format **eventp, | |||
6118 | return 0; | 6118 | return 0; |
6119 | 6119 | ||
6120 | event_parse_failed: | 6120 | event_parse_failed: |
6121 | event->flags |= EVENT_FL_FAILED; | 6121 | event->flags |= TEP_EVENT_FL_FAILED; |
6122 | return ret; | 6122 | return ret; |
6123 | 6123 | ||
6124 | event_alloc_failed: | 6124 | event_alloc_failed: |