Commit 492d9774 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

perf tools: Add tracepoint support for parse_events_error

Allowing tracepoint events processing to report back error.

  $ perf record -e 'sched:krava' ls
  event syntax error: 'sched:krava'
                       \___ unknown tracepoint
  ...
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1429729824-13932-9-git-send-email-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 3b0e371c
...@@ -388,7 +388,13 @@ PE_NAME ':' PE_NAME ...@@ -388,7 +388,13 @@ PE_NAME ':' PE_NAME
struct list_head *list; struct list_head *list;
ALLOC_LIST(list); ALLOC_LIST(list);
ABORT_ON(parse_events_add_tracepoint(list, &data->idx, $1, $3)); if (parse_events_add_tracepoint(list, &data->idx, $1, $3)) {
struct parse_events_error *error = data->error;
error->idx = @1.first_column;
error->str = strdup("unknown tracepoint");
return -1;
}
$$ = list; $$ = list;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment