at master 1.5 kB view raw
1#ifndef TRACE_AUGMENT_H 2#define TRACE_AUGMENT_H 3 4#include <linux/compiler.h> 5 6struct bpf_program; 7struct evlist; 8 9#ifdef HAVE_BPF_SKEL 10 11int augmented_syscalls__prepare(void); 12int augmented_syscalls__create_bpf_output(struct evlist *evlist); 13void augmented_syscalls__setup_bpf_output(void); 14int augmented_syscalls__set_filter_pids(unsigned int nr, pid_t *pids); 15int augmented_syscalls__get_map_fds(int *enter_fd, int *exit_fd, int *beauty_fd); 16struct bpf_program *augmented_syscalls__find_by_title(const char *name); 17struct bpf_program *augmented_syscalls__unaugmented(void); 18void augmented_syscalls__cleanup(void); 19 20#else /* !HAVE_BPF_SKEL */ 21 22static inline int augmented_syscalls__prepare(void) 23{ 24 return -1; 25} 26 27static inline int augmented_syscalls__create_bpf_output(struct evlist *evlist __maybe_unused) 28{ 29 return -1; 30} 31 32static inline void augmented_syscalls__setup_bpf_output(void) 33{ 34} 35 36static inline int augmented_syscalls__set_filter_pids(unsigned int nr __maybe_unused, 37 pid_t *pids __maybe_unused) 38{ 39 return 0; 40} 41 42static inline int augmented_syscalls__get_map_fds(int *enter_fd __maybe_unused, 43 int *exit_fd __maybe_unused, 44 int *beauty_fd __maybe_unused) 45{ 46 return -1; 47} 48 49static inline struct bpf_program * 50augmented_syscalls__find_by_title(const char *name __maybe_unused) 51{ 52 return NULL; 53} 54 55static inline struct bpf_program *augmented_syscalls__unaugmented(void) 56{ 57 return NULL; 58} 59 60static inline void augmented_syscalls__cleanup(void) 61{ 62} 63 64#endif /* HAVE_BPF_SKEL */ 65 66#endif