From: tip-bot for Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
mingo@redhat.com, hpa@zytor.com, mingo@kernel.org,
a.p.zijlstra@chello.nl, namhyung.kim@lge.com, namhyung@gmail.com,
fweisbec@gmail.com, rostedt@goodmis.org,
stefanha@linux.vnet.ibm.com, tglx@linutronix.de, avi@redhat.com
Subject: [tip:perf/urgent] tools lib traceevent: Allow expressions in __print_symbolic() fields
Date: Thu, 24 May 2012 10:16:28 -0700 [thread overview]
Message-ID: <tip-00b9da7219cd027a1c51c3ef576aadbbd9fe38fe@git.kernel.org> (raw)
In-Reply-To: <1337740619-27925-6-git-send-email-namhyung.kim@lge.com>
Commit-ID: 00b9da7219cd027a1c51c3ef576aadbbd9fe38fe
Gitweb: http://git.kernel.org/tip/00b9da7219cd027a1c51c3ef576aadbbd9fe38fe
Author: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
AuthorDate: Wed, 23 May 2012 11:36:42 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 24 May 2012 11:29:25 -0300
tools lib traceevent: 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.
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 files changed, 7 insertions(+), 0 deletions(-)
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;
next prev parent reply other threads:[~2012-05-24 17:17 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-23 2:36 [PATCH 00/22] perf tools: Backport of latest changes on trace-cmd's libparseevent Namhyung Kim
2012-05-23 2:36 ` [PATCH 01/22] lib/traceevent: Let filtering numbers by string use function names Namhyung Kim
2012-05-23 2:36 ` [PATCH 02/22] lib/traceevent: Add support for "%.*s" in bprintk events Namhyung Kim
2012-05-23 2:36 ` [PATCH 03/22] lib/traceevent: Add support to show migrate disable counter Namhyung Kim
2012-05-23 2:36 ` [PATCH 04/22] lib/traceevent: Fix %pM print format arg handling Namhyung Kim
2012-05-23 2:36 ` [PATCH 05/22] lib/traceevent: Allow expressions in __print_symbolic() fields Namhyung Kim
2012-05-24 17:16 ` tip-bot for Stefan Hajnoczi [this message]
2012-05-23 2:36 ` [PATCH 06/22] lib/traceevent: Fix trace_printk for long integers Namhyung Kim
2012-05-23 2:36 ` [PATCH 07/22] lib/traceevent: Fix printk_cmp() Namhyung Kim
2012-05-23 2:36 ` [PATCH 08/22] lib/traceevent: Introduce extend_token() Namhyung Kim
2012-05-23 2:36 ` [PATCH 09/22] lib/traceevent: Handle strdup failure cases Namhyung Kim
2012-05-23 2:36 ` [PATCH 10/22] lib/traceevent: Fix a possible memory leak Namhyung Kim
2012-05-24 17:17 ` [tip:perf/urgent] tools lib traceevent: " tip-bot for Namhyung Kim
2012-05-23 2:36 ` [PATCH 11/22] lib/traceevent: Handle realloc() failure path Namhyung Kim
2012-05-23 2:36 ` [PATCH 12/22] lib/traceevent: Fix a possibly wrong memory dereference Namhyung Kim
2012-05-24 17:18 ` [tip:perf/urgent] tools lib traceevent: " tip-bot for Namhyung Kim
2012-05-23 2:36 ` [PATCH 13/22] lib/traceevent: Fix freeing arg on process_dynamic_array() Namhyung Kim
2012-05-24 17:19 ` [tip:perf/urgent] tools lib traceevent: " tip-bot for Namhyung Kim
2012-05-23 2:36 ` [PATCH 14/22] lib/traceevent: Use proper function parameter type Namhyung Kim
2012-05-24 17:19 ` [tip:perf/urgent] tools lib traceevent: " tip-bot for Namhyung Kim
2012-05-23 2:36 ` [PATCH 15/22] lib/traceevent: Pass string type argument to args Namhyung Kim
2012-05-23 2:36 ` [PATCH 16/22] lib/traceevent: Do not call add_event() again if allocation failed Namhyung Kim
2012-05-23 2:36 ` [PATCH 17/22] lib/traceevent: Fix some comments Namhyung Kim
2012-05-23 2:36 ` [PATCH 18/22] lib/traceevent: Check result of malloc() during reading token Namhyung Kim
2012-05-23 2:36 ` [PATCH 19/22] lib/traceevent: Fix signature of create_arg_item() Namhyung Kim
2012-05-24 17:20 ` [tip:perf/urgent] tools lib traceevent: " tip-bot for Namhyung Kim
2012-05-23 2:36 ` [PATCH 20/22] lib/traceevent: Check return value of arg_to_str() Namhyung Kim
2012-05-23 2:36 ` [PATCH 21/22] lib/traceevent: Add missing break in make_bprint_args Namhyung Kim
2012-05-23 2:36 ` [PATCH 22/22] lib/traceevent: Cleanup realloc use Namhyung Kim
2012-05-24 1:08 ` [PATCH 00/22] perf tools: Backport of latest changes on trace-cmd's libparseevent Steven Rostedt
2012-05-31 6:07 ` Namhyung Kim
2012-05-31 14:52 ` Arnaldo Carvalho de Melo
2012-05-31 15:09 ` Steven Rostedt
2012-05-31 15:13 ` Arnaldo Carvalho de Melo
2012-05-31 15:22 ` Frederic Weisbecker
2012-05-31 15:31 ` Arnaldo Carvalho de Melo
2012-06-01 2:48 ` Namhyung Kim
2012-06-11 2:47 ` Namhyung Kim
2012-06-11 14:17 ` Arnaldo Carvalho de Melo
2012-06-12 6:39 ` Namhyung Kim
2012-06-13 2:39 ` Namhyung Kim
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=tip-00b9da7219cd027a1c51c3ef576aadbbd9fe38fe@git.kernel.org \
--to=stefanha@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=avi@redhat.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@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=tglx@linutronix.de \
/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