Skip to contentSkip to conversation

tools lib traceevent: Fix warning on '>=' operator

PATCH In review Namhyung Kim 3 participants 3 messages Jan 15, 2013 – Jan 25, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools lib traceevent: Fix warning on '>=' operator

From: Namhyung Kim <[email protected]>

Although the '>=' (and '<=') operator is handled properly in libtraceevent, it emitted following spurious warnings on perf test:

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

Add the operator to the checks.

Cc Steven Rostedt <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Jiri Olsa <[email protected]>
---
 tools/lib/traceevent/event-parse.c | 2 ++
 1 file changed, 2 insertions(+)
tools/lib/traceevent/event-parse.c +2 -0
index 5a824e355d04..7286f0e82c29 100644
@@ -1785,6 +1785,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 ||
 		   strcmp(token, "!=") == 0) {
 
Signature · 1 line
1.7.11.7
Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · Namhyung Kim

From: Namhyung Kim <[email protected]>

Although the '>=' (and '<=') operator is handled properly in libtraceevent, it emitted following spurious warnings on perf test:

 $ perf test
 5: parse events tests                                     :
  ...
  Warning: unknown op '>='
  Warning: unknown op '>='
  Warning: unknown op '>='
  Warning: unknown op '>='
  Warning: unknown op '>='
  Warning: unknown op '>='
  ...
Quoted 2 lines

Add the operator to the checks.

-- Steve

Quoted 20 lines
Cc Frederic Weisbecker <[email protected]>
Cc Jiri Olsa <[email protected]>
---
 tools/lib/traceevent/event-parse.c | 2 ++
 1 file changed, 2 insertions(+)
tools/lib/traceevent/event-parse.c +2 -0
index 5a824e355d04..7286f0e82c29 100644
@@ -1785,6 +1785,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 ||
 		   strcmp(token, "!=") == 0) {
 
#2 lore raw
In reply to Namhyung Kim
Commit-ID:  ff582680f8762293aa45eb5cf2faacadbe73b435
Gitweb:     http://git.kernel.org/tip/ff582680f8762293aa45eb5cf2faacadbe73b435
Author:     Namhyung Kim <[email protected]>
AuthorDate: Tue, 15 Jan 2013 17:02:19 +0900
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 24 Jan 2013 16:40:43 -0300

tools lib traceevent: Fix warning on '>=' operator

Although the '>=' (and '<=') operator is handled properly in libtraceevent, it emitted following spurious warnings on perf test:

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

Add the operator to the checks.

---
 tools/lib/traceevent/event-parse.c | 2 ++
 1 file changed, 2 insertions(+)
tools/lib/traceevent/event-parse.c +2 -0
index dc42e55..f504619 100644
@@ -1784,6 +1784,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 ||
 		   strcmp(token, "!=") == 0) {