From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
To: linux-kernel@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Subject: [PATCH 1/3] perf: parse greater/less than or equal
Date: Wed, 07 Dec 2011 10:36:49 +0900 [thread overview]
Message-ID: <4EDEC331.7020506@jp.fujitsu.com> (raw)
In-Reply-To: <4EDEC207.90403@jp.fujitsu.com>
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@jp.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
next prev parent reply other threads:[~2011-12-07 1:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 1:31 [PATCH 0/3] perf: parser fix for btrfs tracepoints Hidetoshi Seto
2011-12-07 1:36 ` Hidetoshi Seto [this message]
2011-12-07 1:37 ` [PATCH 2/3] perf: allow processing single op args Hidetoshi Seto
2011-12-07 1:37 ` [PATCH 3/3] perf: allow typecast for signed value Hidetoshi Seto
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=4EDEC331.7020506@jp.fujitsu.com \
--to=seto.hidetoshi@jp.fujitsu.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.