diff options
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index c799c19f9340..f012395d16fb 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -39,6 +39,9 @@ static const char *input_buf; | |||
39 | static unsigned long long input_buf_ptr; | 39 | static unsigned long long input_buf_ptr; |
40 | static unsigned long long input_buf_siz; | 40 | static unsigned long long input_buf_siz; |
41 | 41 | ||
42 | static int is_flag_field; | ||
43 | static int is_symbolic_field; | ||
44 | |||
42 | static int show_warning = 1; | 45 | static int show_warning = 1; |
43 | 46 | ||
44 | #define do_warning(fmt, ...) \ | 47 | #define do_warning(fmt, ...) \ |
@@ -1789,6 +1792,16 @@ process_entry(struct event_format *event __unused, struct print_arg *arg, | |||
1789 | arg->type = PRINT_FIELD; | 1792 | arg->type = PRINT_FIELD; |
1790 | arg->field.name = field; | 1793 | arg->field.name = field; |
1791 | 1794 | ||
1795 | if (is_flag_field) { | ||
1796 | arg->field.field = pevent_find_any_field(event, arg->field.name); | ||
1797 | arg->field.field->flags |= FIELD_IS_FLAG; | ||
1798 | is_flag_field = 0; | ||
1799 | } else if (is_symbolic_field) { | ||
1800 | arg->field.field = pevent_find_any_field(event, arg->field.name); | ||
1801 | arg->field.field->flags |= FIELD_IS_SYMBOLIC; | ||
1802 | is_symbolic_field = 0; | ||
1803 | } | ||
1804 | |||
1792 | type = read_token(&token); | 1805 | type = read_token(&token); |
1793 | *tok = token; | 1806 | *tok = token; |
1794 | 1807 | ||
@@ -2398,10 +2411,12 @@ process_function(struct event_format *event, struct print_arg *arg, | |||
2398 | 2411 | ||
2399 | if (strcmp(token, "__print_flags") == 0) { | 2412 | if (strcmp(token, "__print_flags") == 0) { |
2400 | free_token(token); | 2413 | free_token(token); |
2414 | is_flag_field = 1; | ||
2401 | return process_flags(event, arg, tok); | 2415 | return process_flags(event, arg, tok); |
2402 | } | 2416 | } |
2403 | if (strcmp(token, "__print_symbolic") == 0) { | 2417 | if (strcmp(token, "__print_symbolic") == 0) { |
2404 | free_token(token); | 2418 | free_token(token); |
2419 | is_symbolic_field = 1; | ||
2405 | return process_symbols(event, arg, tok); | 2420 | return process_symbols(event, arg, tok); |
2406 | } | 2421 | } |
2407 | if (strcmp(token, "__get_str") == 0) { | 2422 | if (strcmp(token, "__get_str") == 0) { |