perf tools: Allow expressions in __print_symbolic() fields
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Sun, 4 Sep 2011 15:08:59 +0000 (16:08 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 17 Feb 2012 18:34:08 +0000 (16:34 -0200)
commita5a178e1ae0192e405830f1bba84548992124e88
tree0befc4ea59e523ba47d0f1b4ca2732bef64072e9
parent09bda4432a8a4d4db2b2b94697abc8d732a9ff73
perf tools: 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.  Also add arg_num_eval() support for
the '+' operator.

Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1315148939-14313-1-git-send-email-stefanha@linux.vnet.ibm.com
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/trace-event-parse.c