projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
449a66f
)
perf: Fix multi-event parsing bug
author
Stephane Eranian
<
[email protected]
>
Tue, 17 May 2011 13:36:19 +0000
(15:36 +0200)
committer
Ingo Molnar
<
[email protected]
>
Tue, 17 May 2011 18:45:36 +0000
(20:45 +0200)
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 <
[email protected]
>
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 <
[email protected]
>
Cc:
[email protected]
Cc:
[email protected]
Cc:
[email protected]
Link:
http://lkml.kernel.org/r/20110517133619.GA6999@quad
Signed-off-by: Ingo Molnar <
[email protected]
>
tools/perf/util/parse-events.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/parse-events.c
b/tools/perf/util/parse-events.c
index ffa493a243332d122835b687a809fd7595f1dd3c..41982c373faf2a075f9bbba9bedcd62cc402e0b8 100644
(file)
--- 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;