diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2011-09-04 06:25:59 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-02-08 20:33:43 -0500 |
commit | 2485bc49f922449ac5de596b7810b8a47a002be1 (patch) | |
tree | c1438ca802dfd6f8daf4c13f687174dcde374ecd | |
parent | 8cadd0d9fea4cb068d194a5d87675abd5a1de786 (diff) |
parse-events: Allow expressions in __print_symbolic() fields
The __print_symbolic() function takes a sequence of key-value pairs for
pretty-printing a constant. The new kvm:kvm_exit print fmt uses the
expression:
__print_symbolic(..., { 0x040 + 1, "DB excp" }, ...)
Currently only atoms are supported and this print fmt fails to parse.
This patch adds support for expressions instead of just atoms so that
0x040 + 1 is parsed successfully.
Link: http://lkml.kernel.org/r/1315131959-7452-1-git-send-email-stefanha@linux.vnet.ibm.com
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: Avi Kivity <avi@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | parse-events.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/parse-events.c b/parse-events.c index 2461814..f8ba6a5 100644 --- a/parse-events.c +++ b/parse-events.c | |||
@@ -2110,6 +2110,13 @@ process_fields(struct event_format *event, struct print_flag_sym **list, char ** | |||
2110 | 2110 | ||
2111 | free_token(token); | 2111 | free_token(token); |
2112 | type = process_arg(event, arg, &token); | 2112 | type = process_arg(event, arg, &token); |
2113 | |||
2114 | if (type == EVENT_OP) | ||
2115 | type = process_op(event, arg, &token); | ||
2116 | |||
2117 | if (type == EVENT_ERROR) | ||
2118 | goto out_free; | ||
2119 | |||
2113 | if (test_type_token(type, token, EVENT_DELIM, ",")) | 2120 | if (test_type_token(type, token, EVENT_DELIM, ",")) |
2114 | goto out_free; | 2121 | goto out_free; |
2115 | 2122 | ||