Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd9a9ad5 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 4bca770e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -555,7 +555,7 @@ static enum event_result parse_tracepoint_event(const char **strp,
	if (evt_length >= MAX_EVENT_LENGTH)
		return EVT_FAILED;
	if (strpbrk(evt_name, "*?")) {
		*strp += strlen(sys_name) + evt_length;
		*strp += strlen(sys_name) + evt_length + 1; /* 1 == the ':' */
		return parse_multiple_tracepoint_event(sys_name, evt_name,
						       flags);
	} else {