From: tip-bot for Stephane Eranian <eranian@google.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, eranian@google.com, hpa@zytor.com,
mingo@redhat.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/core] perf: Fix multi-event parsing bug
Date: Wed, 18 May 2011 05:21:59 GMT [thread overview]
Message-ID: <tip-94692349c4fc1bc74c19a28f9379509361a06a3b@git.kernel.org> (raw)
In-Reply-To: <20110517133619.GA6999@quad>
Commit-ID: 94692349c4fc1bc74c19a28f9379509361a06a3b
Gitweb: http://git.kernel.org/tip/94692349c4fc1bc74c19a28f9379509361a06a3b
Author: Stephane Eranian <eranian@google.com>
AuthorDate: Tue, 17 May 2011 15:36:19 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 17 May 2011 20:45:36 +0200
perf: Fix multi-event parsing bug
This patch fixes an issue with event parsing.
The following commit appears to have broken the
ability to specify a comma separated list of events:
commit ceb53fbf6dbb1df26d38379a262c6981fe73dd36
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Apr 27 04:06:33 2011 +0200
perf stat: Fail more clearly when an invalid modifier is specified
This patch fixes this while preserving the desired effect:
$ perf stat -e instructions:u,instructions:k ls /dev/null /dev/null
Performance counter stats for 'ls /dev/null':
365956 instructions:u # 0.00 insns per cycle
731806 instructions:k # 0.00 insns per cycle
0.001108862 seconds time elapsed
$ perf stat -e task-clock-msecs true
invalid event modifier: '-msecs'
Run 'perf list' for a list of valid events and modifiers
Signed-off-by: Stephane Eranian <eranian@google.com>
Cc: acme@redhat.com
Cc: peterz@infradead.org
Cc: fweisbec@gmail.com
Link: http://lkml.kernel.org/r/20110517133619.GA6999@quad
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/util/parse-events.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index ffa493a..41982c3 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -734,6 +734,9 @@ parse_event_modifier(const char **strp, struct perf_event_attr *attr)
if (!*str)
return 0;
+ if (*str == ',')
+ return 0;
+
if (*str++ != ':')
return -1;
prev parent reply other threads:[~2011-05-18 5:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-17 13:36 [PATCH] perf: fix multi-event parsing bug Stephane Eranian
2011-05-18 5:21 ` tip-bot for Stephane Eranian [this message]
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=tip-94692349c4fc1bc74c19a28f9379509361a06a3b@git.kernel.org \
--to=eranian@google.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).