9 #include <linux/compiler.h> 10 #include <linux/err.h> 12 #include <bpf/libbpf.h> 48 #define PERF_BPF_PROBE_GROUP "perf_bpf_probe" 53 #ifdef HAVE_LIBBPF_SUPPORT 56 int err,
char *buf,
size_t size);
66 char *buf,
size_t size);
70 char *buf,
size_t size);
79 int *error_pos,
int err,
char *buf,
86 char *buf,
size_t size);
91 static inline struct bpf_object *
93 bool source __maybe_unused)
95 pr_debug(
"ERROR: eBPF object loading is disabled during compiling.\n");
96 return ERR_PTR(-ENOTSUP);
99 static inline struct bpf_object *
101 size_t obj_buf_sz __maybe_unused)
103 return ERR_PTR(-ENOTSUP);
108 static inline int bpf__probe(
struct bpf_object *obj __maybe_unused) {
return 0;}
109 static inline int bpf__unprobe(
struct bpf_object *obj __maybe_unused) {
return 0;}
110 static inline int bpf__load(
struct bpf_object *obj __maybe_unused) {
return 0; }
115 void *arg __maybe_unused)
124 int *error_pos __maybe_unused)
147 "ERROR: eBPF object loading is disabled during compiling.\n",
149 buf[size - 1] =
'\0';
155 bool source __maybe_unused,
156 int err __maybe_unused,
157 char *buf,
size_t size)
164 int err __maybe_unused,
165 char *buf,
size_t size)
171 int err __maybe_unused,
172 char *buf,
size_t size)
181 int *error_pos __maybe_unused,
182 int err __maybe_unused,
183 char *buf,
size_t size)
190 char *buf,
size_t size)
197 int err __maybe_unused,
char *buf,
static int bpf__strerror_apply_obj_config(int err __maybe_unused, char *buf, size_t size)
static struct bpf_object * bpf__prepare_load(const char *filename __maybe_unused, bool source __maybe_unused)
static void bpf__clear(void)
static int bpf__setup_stdout(struct perf_evlist *evlist __maybe_unused)
static int bpf__strerror_prepare_load(const char *filename __maybe_unused, bool source __maybe_unused, int err __maybe_unused, char *buf, size_t size)
static int bpf__strerror_config_obj(struct bpf_object *obj __maybe_unused, struct parse_events_term *term __maybe_unused, struct perf_evlist *evlist __maybe_unused, int *error_pos __maybe_unused, int err __maybe_unused, char *buf, size_t size)
static int __bpf_strerror(char *buf, size_t size)
static int term(yyscan_t scanner, int type)
static int bpf__strerror_setup_stdout(struct perf_evlist *evlist __maybe_unused, int err __maybe_unused, char *buf, size_t size)
static int bpf__unprobe(struct bpf_object *obj __maybe_unused)
static int bpf__strerror_probe(struct bpf_object *obj __maybe_unused, int err __maybe_unused, char *buf, size_t size)
static int bpf__probe(struct bpf_object *obj __maybe_unused)
#define pr_debug(fmt,...)
static int bpf__apply_obj_config(void)
static int bpf__config_obj(struct bpf_object *obj __maybe_unused, struct parse_events_term *term __maybe_unused, struct perf_evlist *evlist __maybe_unused, int *error_pos __maybe_unused)
int(* bpf_prog_iter_callback_t)(const char *group, const char *event, int fd, void *arg)
static int bpf__foreach_event(struct bpf_object *obj __maybe_unused, bpf_prog_iter_callback_t func __maybe_unused, void *arg __maybe_unused)
static struct bpf_object * bpf__prepare_load_buffer(void *obj_buf __maybe_unused, size_t obj_buf_sz __maybe_unused)
static int bpf__strerror_load(struct bpf_object *obj __maybe_unused, int err __maybe_unused, char *buf, size_t size)
static int bpf__load(struct bpf_object *obj __maybe_unused)