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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent cff62414
...@@ -6,9 +6,8 @@ ...@@ -6,9 +6,8 @@
#ifndef __BPF_PROLOGUE_H #ifndef __BPF_PROLOGUE_H
#define __BPF_PROLOGUE_H #define __BPF_PROLOGUE_H
#include <linux/compiler.h> struct probe_trace_arg;
#include <linux/filter.h> struct bpf_insn;
#include "probe-event.h"
#define BPF_PROLOGUE_MAX_ARGS 3 #define BPF_PROLOGUE_MAX_ARGS 3
#define BPF_PROLOGUE_START_ARG_REG BPF_REG_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, ...@@ -19,6 +18,7 @@ int bpf__gen_prologue(struct probe_trace_arg *args, int nargs,
struct bpf_insn *new_prog, size_t *new_cnt, struct bpf_insn *new_prog, size_t *new_cnt,
size_t cnt_space); size_t cnt_space);
#else #else
#include <linux/compiler.h>
#include <errno.h> #include <errno.h>
static inline int static inline int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment