From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
Avi Kivity <avi@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>, Namhyung Kim <namhyung@gmail.com>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Namhyung Kim <namhyung.kim@lge.com>,
Steven Rostedt <rostedt@goodmis.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 1/6] tools lib traceevent: Allow expressions in __print_symbolic() fields
Date: Thu, 24 May 2012 13:40:08 -0300 [thread overview]
Message-ID: <1337877613-15133-2-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1337877613-15133-1-git-send-email-acme@infradead.org>
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
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.
Cc: Avi Kivity <avi@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1337740619-27925-6-git-send-email-namhyung.kim@lge.com
Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/lib/traceevent/event-parse.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 9985349..33450c9 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -2124,6 +2124,13 @@ process_fields(struct event_format *event, struct print_flag_sym **list, char **
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;
--
1.7.9.2.358.g22243
next prev parent reply other threads:[~2012-05-24 16:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 16:40 [GIT PULL 0/6] perf/urgent fixes for libtraceevent Arnaldo Carvalho de Melo
2012-05-24 16:40 ` Arnaldo Carvalho de Melo [this message]
2012-05-24 16:40 ` [PATCH 2/6] tools lib traceevent: Fix a possible memory leak Arnaldo Carvalho de Melo
2012-05-24 16:40 ` [PATCH 3/6] tools lib traceevent: Fix a possibly wrong memory dereference Arnaldo Carvalho de Melo
2012-05-24 16:40 ` [PATCH 4/6] tools lib traceevent: Fix freeing arg on process_dynamic_array() Arnaldo Carvalho de Melo
2012-05-24 16:40 ` [PATCH 5/6] tools lib traceevent: Use proper function parameter type Arnaldo Carvalho de Melo
2012-05-24 16:40 ` [PATCH 6/6] tools lib traceevent: Fix signature of create_arg_item() Arnaldo Carvalho de Melo
2012-05-24 17:04 ` [GIT PULL 0/6] perf/urgent fixes for libtraceevent Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337877613-15133-2-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=avi@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung.kim@lge.com \
--cc=namhyung@gmail.com \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.org \
--cc=stefanha@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®