Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304975
b: refs/heads/master
c: 5205aec
h: refs/heads/master
i:
  304973: dff927f
  304971: b9381de
  304967: 86503a1
  304959: 5ad6f8b
v: v3
  • Loading branch information
Tom Zanussi authored and Frederic Weisbecker committed Apr 25, 2012
1 parent d67025d commit 99b5879
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4dc1024a7a529626de5a800b10088bcbbc1ae941
refs/heads/master: 5205aec960514089d12dd8e35f2a82584b8e6172
15 changes: 15 additions & 0 deletions trunk/tools/lib/traceevent/event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ static const char *input_buf;
static unsigned long long input_buf_ptr;
static unsigned long long input_buf_siz;

static int is_flag_field;
static int is_symbolic_field;

static int show_warning = 1;

#define do_warning(fmt, ...) \
Expand Down Expand Up @@ -1789,6 +1792,16 @@ process_entry(struct event_format *event __unused, struct print_arg *arg,
arg->type = PRINT_FIELD;
arg->field.name = field;

if (is_flag_field) {
arg->field.field = pevent_find_any_field(event, arg->field.name);
arg->field.field->flags |= FIELD_IS_FLAG;
is_flag_field = 0;
} else if (is_symbolic_field) {
arg->field.field = pevent_find_any_field(event, arg->field.name);
arg->field.field->flags |= FIELD_IS_SYMBOLIC;
is_symbolic_field = 0;
}

type = read_token(&token);
*tok = token;

Expand Down Expand Up @@ -2398,10 +2411,12 @@ process_function(struct event_format *event, struct print_arg *arg,

if (strcmp(token, "__print_flags") == 0) {
free_token(token);
is_flag_field = 1;
return process_flags(event, arg, tok);
}
if (strcmp(token, "__print_symbolic") == 0) {
free_token(token);
is_symbolic_field = 1;
return process_symbols(event, arg, tok);
}
if (strcmp(token, "__get_str") == 0) {
Expand Down

0 comments on commit 99b5879

Please sign in to comment.