summaryrefslogtreecommitdiff
path: root/tools/perf/util/bpf-loader.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2018-08-07 22:19:05 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-08-08 21:55:58 +0300
commit78e890ea8683f7d570f911637b23b23d27be4aed (patch)
tree06e74fa399e98744f89cc77ea1b41151726ca541 /tools/perf/util/bpf-loader.h
parente0b6d2ef329098bd9780ec00a75db3b11922031a (diff)
downloadlinux-78e890ea8683f7d570f911637b23b23d27be4aed.tar.xz
perf bpf: Make bpf__setup_output_event() return the bpf-output event
We're calling it to setup that event, and we'll need it later to decide if the bpf-output event we're handling is the one setup for a specific purpose, return it using ERR_PTR, etc. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-zhachv7il2n1lopt9aonwhu7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/bpf-loader.h')
-rw-r--r--tools/perf/util/bpf-loader.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/util/bpf-loader.h b/tools/perf/util/bpf-loader.h
index 8eca75145ac2..62d245a90e1d 100644
--- a/tools/perf/util/bpf-loader.h
+++ b/tools/perf/util/bpf-loader.h
@@ -43,6 +43,7 @@ enum bpf_loader_errno {
__BPF_LOADER_ERRNO__END,
};
+struct perf_evsel;
struct bpf_object;
struct parse_events_term;
#define PERF_BPF_PROBE_GROUP "perf_bpf_probe"
@@ -82,7 +83,7 @@ int bpf__apply_obj_config(void);
int bpf__strerror_apply_obj_config(int err, char *buf, size_t size);
int bpf__setup_stdout(struct perf_evlist *evlist);
-int bpf__setup_output_event(struct perf_evlist *evlist, const char *name);
+struct perf_evsel *bpf__setup_output_event(struct perf_evlist *evlist, const char *name);
int bpf__strerror_setup_output_event(struct perf_evlist *evlist, int err, char *buf, size_t size);
#else
#include <errno.h>
@@ -137,10 +138,10 @@ bpf__setup_stdout(struct perf_evlist *evlist __maybe_unused)
return 0;
}
-static inline int
+static inline struct perf_evsel *
bpf__setup_output_event(struct perf_evlist *evlist __maybe_unused, const char *name __maybe_unused)
{
- return 0;
+ return NULL;
}
static inline int