summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/bpf-prologue.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2022-10-26 18:52:17 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-10-31 15:05:41 +0100
commit8d0d129e94d4518fd17c13b4991ff10b7f4cd85a (patch)
treeecbde3eac045f2700bf2de70ff497a350f12d748 /tools/perf/util/bpf-prologue.h
parentperf bpf: No need to include compiler.h when HAVE_LIBBPF_SUPPORT is true (diff)
downloadlinux-8d0d129e94d4518fd17c13b4991ff10b7f4cd85a.tar.xz
linux-8d0d129e94d4518fd17c13b4991ff10b7f4cd85a.zip
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 <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/bpf-prologue.h')
-rw-r--r--tools/perf/util/bpf-prologue.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/bpf-prologue.h b/tools/perf/util/bpf-prologue.h
index c50c7358009f..66dcf751ef65 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 <linux/compiler.h>
-#include <linux/filter.h>
-#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 <linux/compiler.h>
#include <errno.h>
static inline int