1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __TRACE_HELPER_H
3 #define __TRACE_HELPER_H
6 #include <linux/perf_event.h>
13 int load_kallsyms(void);
14 struct ksym
*ksym_search(long key
);
15 long ksym_get_addr(const char *name
);
17 typedef enum bpf_perf_event_ret (*perf_event_print_fn
)(void *data
, int size
);
19 int perf_event_mmap(int fd
);
20 int perf_event_mmap_header(int fd
, struct perf_event_mmap_page
**header
);
21 /* return LIBBPF_PERF_EVENT_DONE or LIBBPF_PERF_EVENT_ERROR */
22 int perf_event_poller(int fd
, perf_event_print_fn output_fn
);
23 int perf_event_poller_multi(int *fds
, struct perf_event_mmap_page
**headers
,
24 int num_fds
, perf_event_print_fn output_fn
);