From: Arnaldo Carvalho de Melo Date: Wed, 26 Oct 2022 16:52:17 +0000 (-0300) Subject: perf bpf: No need to include headers just use forward declarations X-Git-Tag: v6.2-rc1~64^2~202 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d0d129e94d4518fd17c13b4991ff10b7f4cd85a;p=thirdparty%2Fkernel%2Flinux.git perf bpf: No need to include headers just use forward declarations In the bpf-prologue.h header we are just using pointers, so no need to include headers for that, just provide forward declarations for those types. Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/bpf-prologue.h b/tools/perf/util/bpf-prologue.h index c50c7358009f2..66dcf751ef654 100644 --- a/tools/perf/util/bpf-prologue.h +++ b/tools/perf/util/bpf-prologue.h @@ -6,9 +6,8 @@ #ifndef __BPF_PROLOGUE_H #define __BPF_PROLOGUE_H -#include -#include -#include "probe-event.h" +struct probe_trace_arg; +struct bpf_insn; #define BPF_PROLOGUE_MAX_ARGS 3 #define BPF_PROLOGUE_START_ARG_REG BPF_REG_3 @@ -19,6 +18,7 @@ int bpf__gen_prologue(struct probe_trace_arg *args, int nargs, struct bpf_insn *new_prog, size_t *new_cnt, size_t cnt_space); #else +#include #include static inline int