summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2015-04-22 21:10:23 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-04-29 10:38:01 -0300
commit492d977444734e03c0633a238f1431b3c66b3e97 (patch)
tree6b6b08dfd22f082db1e1b246d798b905a76a64f5
parent3b0e371cc05dfb624f990ea5e1da2bff615adaef (diff)
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: Jiri Olsa <jolsa@kernel.org> Tested-by: Arnaldo 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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/parse-events.y8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 486247739a39..38a0f21fc433 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -388,7 +388,13 @@ PE_NAME ':' PE_NAME
struct list_head *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;
}