diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-17 11:25:06 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-17 12:26:07 -0500 |
commit | dd9a9ad5e1e94894433110ccbf492ed60d75ffcb (patch) | |
tree | 844658ad481c46ffaaa48d4f7a73b7bd6ac0720c /tools | |
parent | 4bca770ede796a1ef7af9c983166d5608d9ccfaf (diff) |
perf tools: Fix handling of wildcards in tracepoint event selectors
It wasn't accounting the ':' when consuming bytes in the the event
selector string, so parse_events() would fail in this test:
if (!(*str == 0 || *str == ',' || isspace(*str)))
return -1;
as *str would be pointing to '*', the last character in the '-e' arg in:
$ perf record -q -a -D -e sched:sched_* | perf script -i - -s perf-script.py
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/parse-events.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 5cb6f4bde905..1f4cfe5d32fc 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c | |||
@@ -555,7 +555,7 @@ static enum event_result parse_tracepoint_event(const char **strp, | |||
555 | if (evt_length >= MAX_EVENT_LENGTH) | 555 | if (evt_length >= MAX_EVENT_LENGTH) |
556 | return EVT_FAILED; | 556 | return EVT_FAILED; |
557 | if (strpbrk(evt_name, "*?")) { | 557 | if (strpbrk(evt_name, "*?")) { |
558 | *strp += strlen(sys_name) + evt_length; | 558 | *strp += strlen(sys_name) + evt_length + 1; /* 1 == the ':' */ |
559 | return parse_multiple_tracepoint_event(sys_name, evt_name, | 559 | return parse_multiple_tracepoint_event(sys_name, evt_name, |
560 | flags); | 560 | flags); |
561 | } else { | 561 | } else { |