Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288680
b: refs/heads/master
c: a5a178e
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Hajnoczi authored and Arnaldo Carvalho de Melo committed Feb 17, 2012
1 parent 72e2e6a commit 4ba5f6d
Show file tree
Hide file tree
Showing 2 changed files with 13 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: 09bda4432a8a4d4db2b2b94697abc8d732a9ff73
refs/heads/master: a5a178e1ae0192e405830f1bba84548992124e88
12 changes: 12 additions & 0 deletions trunk/tools/perf/util/trace-event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,11 @@ static long long arg_num_eval(struct print_arg *arg)
die("unknown op '%s'", arg->op.op);
}
break;
case '+':
left = arg_num_eval(arg->op.left);
right = arg_num_eval(arg->op.right);
val = left + right;
break;
default:
die("unknown op '%s'", arg->op.op);
}
Expand Down Expand Up @@ -1483,6 +1488,13 @@ process_fields(struct event *event, struct print_flag_sym **list, char **tok)

free_token(token);
type = process_arg(event, arg, &token);

if (type == EVENT_OP)
type = process_op(event, arg, &token);

if (type == EVENT_ERROR)
goto out_free;

if (test_type_token(type, token, EVENT_DELIM, ","))
goto out_free;

Expand Down

0 comments on commit 4ba5f6d

Please sign in to comment.