perf tools: Fix handling of wildcards in tracepoint event selectors
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 17 Jan 2011 16:25:06 +0000 (14:25 -0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 17 Jan 2011 17:26:07 +0000 (15:26 -0200)
commitdd9a9ad5e1e94894433110ccbf492ed60d75ffcb
tree844658ad481c46ffaaa48d4f7a73b7bd6ac0720c
parent4bca770ede796a1ef7af9c983166d5608d9ccfaf
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>
tools/perf/util/parse-events.c