[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EDEC331.7020506@jp.fujitsu.com>
Date: Wed, 07 Dec 2011 10:36:49 +0900
From: Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>
To: linux-kernel@...r.kernel.org
CC: linux-btrfs@...r.kernel.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: [PATCH 1/3] perf: parse greater/less than or equal
Some btrfs tracepoints have complex format like following, but perf
command failed to parse it:
print fmt: "%s", ((REC->id >= min) || (REC->id <= max )) ?
__print_symbolic(REC->id, { 1ULL, "ROOT_TREE" }, ... ) : "-"
$ perf script
Warning: unknown op '>='
Warning: Error: expected type 5 but read 1
Warning: failed to read event print fmt for btrfs_transaction_commit
This patch allow perf command to parse operation tokens, '>=' and '<='.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>
---
tools/perf/util/trace-event-parse.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 0a7ed5b..c2adc76 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -1229,6 +1229,8 @@ process_op(struct event *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) {
--
1.7.7.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists