Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169855
b: refs/heads/master
c: eb9a42c
h: refs/heads/master
i:
  169853: 1160826
  169851: 97c346b
  169847: 273f7c9
  169839: 4d88924
  169823: 8b27dfd
  169791: c3074e2
  169727: bee6342
v: v3
  • Loading branch information
Tom Zanussi authored and Ingo Molnar committed Nov 28, 2009
1 parent 0c5fe61 commit 5b68cb3
Show file tree
Hide file tree
Showing 3 changed files with 20 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: 956ffd027bedc4106b901eb6a50f0a6c6de4113d
refs/heads/master: eb9a42caa7a926beb935a22bc59d981b35f0b652
17 changes: 17 additions & 0 deletions trunk/tools/perf/util/trace-event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ static unsigned long long input_buf_siz;

static int cpus;
static int long_size;
static int is_flag_field;
static int is_symbolic_field;

static struct format_field *
find_any_field(struct event *event, const char *name);

static void init_input_buf(char *buf, unsigned long long size)
{
Expand Down Expand Up @@ -1301,6 +1306,16 @@ process_entry(struct event *event __unused, struct print_arg *arg,
arg->type = PRINT_FIELD;
arg->field.name = field;

if (is_flag_field) {
arg->field.field = 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 = 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 @@ -1668,9 +1683,11 @@ process_arg_token(struct event *event, struct print_arg *arg,
type = process_entry(event, arg, &token);
} else if (strcmp(token, "__print_flags") == 0) {
free_token(token);
is_flag_field = 1;
type = process_flags(event, arg, &token);
} else if (strcmp(token, "__print_symbolic") == 0) {
free_token(token);
is_symbolic_field = 1;
type = process_symbols(event, arg, &token);
} else if (strcmp(token, "__get_str") == 0) {
free_token(token);
Expand Down
2 changes: 2 additions & 0 deletions trunk/tools/perf/util/trace-event.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ enum format_flags {
FIELD_IS_SIGNED = 4,
FIELD_IS_STRING = 8,
FIELD_IS_DYNAMIC = 16,
FIELD_IS_FLAG = 32,
FIELD_IS_SYMBOLIC = 64,
};

struct format_field {
Expand Down

0 comments on commit 5b68cb3

Please sign in to comment.