lkml.org 
[lkml]   [2014]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/5] tools lib traceevent: handle the '->' operator
Date
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


\
 
 \ /
  Last update: 2014-03-18 00:21    [W:0.096 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site