[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-492d977444734e03c0633a238f1431b3c66b3e97@git.kernel.org>
Date: Tue, 5 May 2015 20:06:07 -0700
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, dsahern@...il.com, jolsa@...nel.org,
hpa@...or.com, a.p.zijlstra@...llo.nl, namhyung@...nel.org,
linux-kernel@...r.kernel.org, mingo@...nel.org, tglx@...utronix.de,
paulus@...ba.org
Subject: [tip:perf/core] perf tools:
Add tracepoint support for parse_events_error
Commit-ID: 492d977444734e03c0633a238f1431b3c66b3e97
Gitweb: http://git.kernel.org/tip/492d977444734e03c0633a238f1431b3c66b3e97
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Wed, 22 Apr 2015 21:10:23 +0200
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 29 Apr 2015 10:38:01 -0300
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@...nel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1429729824-13932-9-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.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 4862477..38a0f21 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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists