Loading...
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __TRACE_HELPER_H
3#define __TRACE_HELPER_H
4
5#include <libbpf.h>
6
7struct ksym {
8 long addr;
9 char *name;
10};
11
12int load_kallsyms(void);
13struct ksym *ksym_search(long key);
14long ksym_get_addr(const char *name);
15
16#endif
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __TRACE_HELPER_H
3#define __TRACE_HELPER_H
4
5#include <bpf/libbpf.h>
6
7struct ksym {
8 long addr;
9 char *name;
10};
11
12int load_kallsyms(void);
13int load_kallsyms_refresh(void);
14
15struct ksym *ksym_search(long key);
16long ksym_get_addr(const char *name);
17
18/* open kallsyms and find addresses on the fly, faster than load + search. */
19int kallsyms_find(const char *sym, unsigned long long *addr);
20
21void read_trace_pipe(void);
22
23ssize_t get_uprobe_offset(const void *addr);
24ssize_t get_rel_offset(uintptr_t addr);
25
26#endif