2018-04-29 13:28:13 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef __TRACE_HELPER_H
|
|
|
|
#define __TRACE_HELPER_H
|
|
|
|
|
2020-01-20 21:06:45 +08:00
|
|
|
#include <bpf/libbpf.h>
|
2018-05-11 01:24:40 +08:00
|
|
|
|
2018-04-29 13:28:13 +08:00
|
|
|
struct ksym {
|
|
|
|
long addr;
|
|
|
|
char *name;
|
|
|
|
};
|
|
|
|
|
|
|
|
int load_kallsyms(void);
|
|
|
|
struct ksym *ksym_search(long key);
|
2018-05-25 02:21:11 +08:00
|
|
|
long ksym_get_addr(const char *name);
|
2020-09-30 07:50:46 +08:00
|
|
|
|
|
|
|
/* open kallsyms and find addresses on the fly, faster than load + search. */
|
|
|
|
int kallsyms_find(const char *sym, unsigned long long *addr);
|
|
|
|
|
2020-03-21 18:04:23 +08:00
|
|
|
void read_trace_pipe(void);
|
2018-04-29 13:28:13 +08:00
|
|
|
|
|
|
|
#endif
|