diff options
Diffstat (limited to 'tools/perf/util/bpf-loader.h')
-rw-r--r-- | tools/perf/util/bpf-loader.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/perf/util/bpf-loader.h b/tools/perf/util/bpf-loader.h index b091ceb19c48..a8f25ee06fc5 100644 --- a/tools/perf/util/bpf-loader.h +++ b/tools/perf/util/bpf-loader.h @@ -8,11 +8,15 @@ #include <linux/compiler.h> #include <linux/err.h> #include <string.h> +#include "probe-event.h" #include "debug.h" struct bpf_object; #define PERF_BPF_PROBE_GROUP "perf_bpf_probe" +typedef int (*bpf_prog_iter_callback_t)(struct probe_trace_event *tev, + int fd, void *arg); + #ifdef HAVE_LIBBPF_SUPPORT struct bpf_object *bpf__prepare_load(const char *filename); @@ -26,6 +30,8 @@ int bpf__strerror_probe(struct bpf_object *obj, int err, int bpf__load(struct bpf_object *obj); int bpf__strerror_load(struct bpf_object *obj, int err, char *buf, size_t size); +int bpf__foreach_tev(struct bpf_object *obj, + bpf_prog_iter_callback_t func, void *arg); #else static inline struct bpf_object * bpf__prepare_load(const char *filename __maybe_unused) @@ -41,6 +47,14 @@ static inline int bpf__unprobe(struct bpf_object *obj __maybe_unused) { return 0 static inline int bpf__load(struct bpf_object *obj __maybe_unused) { return 0; } static inline int +bpf__foreach_tev(struct bpf_object *obj __maybe_unused, + bpf_prog_iter_callback_t func __maybe_unused, + void *arg __maybe_unused) +{ + return 0; +} + +static inline int __bpf_strerror(char *buf, size_t size) { if (!size) |