summaryrefslogtreecommitdiff
path: root/tools/perf/util/evsel.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2015-09-07 08:38:06 (GMT)
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-09-15 12:48:33 (GMT)
commit8dd2a1317eba2c207632dcb19adb7cb746861652 (patch)
tree15d062f65152a883e2dd459f397bbcf5b1cffe68 /tools/perf/util/evsel.h
parente2f9f8ea6a54e252e3a94a5c2321f673b5b97360 (diff)
downloadlinux-8dd2a1317eba2c207632dcb19adb7cb746861652.tar.xz
perf evsel: Propagate error info from tp_format
Propagate error info from tp_format via ERR_PTR to get it all the way down to the parse-event.c tracepoint adding routines. Following functions now return pointer with encoded error: - tp_format - trace_event__tp_format - perf_evsel__newtp_idx - perf_evsel__newtp This affects several other places in perf, that cannot use pointer check anymore, but must utilize the err.h interface, when getting error information from above functions list. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Raphael Beamonte <raphael.beamonte@gmail.com> Link: http://lkml.kernel.org/r/1441615087-13886-5-git-send-email-jolsa@kernel.org [ Add two missing ERR_PTR() and one IS_ERR() ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.h')
-rw-r--r--tools/perf/util/evsel.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index f164a14..62ab307 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -160,6 +160,9 @@ static inline struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr)
struct perf_evsel *perf_evsel__newtp_idx(const char *sys, const char *name, int idx);
+/*
+ * Returns pointer with encoded error via <linux/err.h> interface.
+ */
static inline struct perf_evsel *perf_evsel__newtp(const char *sys, const char *name)
{
return perf_evsel__newtp_idx(sys, name, 0);