public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@redhat.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 2/5] tools lib traceevent: handle the '->' operator
Date: Mon, 17 Mar 2014 18:26:35 -0400	[thread overview]
Message-ID: <1395095198-20034-3-git-send-email-artagnon@gmail.com> (raw)
In-Reply-To: <1395095198-20034-1-git-send-email-artagnon@gmail.com>

perf test emits the following warning:

  $ perf test
   5: parse events tests
    ...
    Warning: unknown op '->'
    ...

Add the operator to the checks.

Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 tools/lib/traceevent/event-parse.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 1587ea39..42bc571 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -1759,6 +1759,8 @@ static int get_op_prio(char *op)
 			return 14;
 		} else if (strcmp(op, "||") == 0) {
 			return 15;
+		} else if (strcmp(op, "->") == 0) {
+			return 17;
 		} else {
 			do_warning("unknown op '%s'", op);
 			return -1;
@@ -1858,7 +1860,8 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok)
 		   strcmp(token, "<=") == 0 ||
 		   strcmp(token, ">=") == 0 ||
 		   strcmp(token, "==") == 0 ||
-		   strcmp(token, "!=") == 0) {
+		   strcmp(token, "!=") == 0 ||
+		   strcmp(token, "->") == 0) {
 
 		left = alloc_arg();
 		if (!left)
-- 
1.9.0.431.g014438b


  parent reply	other threads:[~2014-03-17 22:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17 22:26 [PATCH 0/5] Squelch warnings emitted by 'perf test' Ramkumar Ramachandra
2014-03-17 22:26 ` [PATCH 1/5] MAINTAINERS: add tools/lib/traceevent/ to perf subsystem Ramkumar Ramachandra
2014-03-20 14:51   ` Steven Rostedt
2014-03-17 22:26 ` Ramkumar Ramachandra [this message]
     [not found]   ` <87ha6wrl8h.fsf@sejong.aot.lge.com>
2014-03-18 14:12     ` [PATCH 2/5] tools lib traceevent: handle the '->' operator Ramkumar Ramachandra
2014-03-18 14:18       ` Namhyung Kim
2014-03-18 15:15         ` Steven Rostedt
2014-03-17 22:26 ` [PATCH 3/5] tools lib traceevent: use else-if cascade, not separate ifs Ramkumar Ramachandra
     [not found]   ` <87d2hkrl32.fsf@sejong.aot.lge.com>
2014-03-18 13:10     ` Arnaldo Carvalho de Melo
2014-03-18 13:30       ` Steven Rostedt
2014-03-18 14:18         ` Arnaldo Carvalho de Melo
2014-03-17 22:26 ` [PATCH 4/5] tools lib traceevent: field_is_long() includes unsigned long Ramkumar Ramachandra
2014-03-17 22:26 ` [PATCH 5/5] perf test: squelch warnings about undefined sizeof Ramkumar Ramachandra
     [not found]   ` <878us8rkqq.fsf@sejong.aot.lge.com>
2014-03-18 13:23     ` Jiri Olsa
2014-03-18 14:26       ` Namhyung Kim
2014-03-18 16:40       ` Ramkumar Ramachandra

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=1395095198-20034-3-git-send-email-artagnon@gmail.com \
    --to=artagnon@gmail.com \
    --cc=acme@redhat.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    /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