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