[PATCH 40/64] perf tools: Add tracepoint support for parse_events_error
From: Jiri Olsa 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 Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1429729824-13932-9-git-send-email-jo...@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/parse-events.y | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) 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, >idx, $1, $3)); + if (parse_events_add_tracepoint(list, >idx, $1, $3)) { + struct parse_events_error *error = data->error; + + error->idx = @1.first_column; + error->str = strdup("unknown tracepoint"); + return -1; + } $$ = list; } -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 40/64] perf tools: Add tracepoint support for parse_events_error
From: Jiri Olsa jo...@kernel.org 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 jo...@kernel.org Tested-by: Arnaldo Carvalho de Melo a...@redhat.com Cc: David Ahern dsah...@gmail.com Cc: Namhyung Kim namhy...@kernel.org Cc: Paul Mackerras pau...@samba.org Cc: Peter Zijlstra a.p.zijls...@chello.nl Link: http://lkml.kernel.org/r/1429729824-13932-9-git-send-email-jo...@kernel.org Signed-off-by: Arnaldo Carvalho de Melo a...@redhat.com --- tools/perf/util/parse-events.y | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; } -- 1.9.3 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/