1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2015, He Kuang <hekuang@huawei.com>
4 * Copyright (C) 2015, Huawei Inc.
6 #ifndef __BPF_PROLOGUE_H
7 #define __BPF_PROLOGUE_H
9 struct probe_trace_arg;
12 #define BPF_PROLOGUE_MAX_ARGS 3
13 #define BPF_PROLOGUE_START_ARG_REG BPF_REG_3
14 #define BPF_PROLOGUE_FETCH_RESULT_REG BPF_REG_2
16 #ifdef HAVE_BPF_PROLOGUE
17 int bpf__gen_prologue(struct probe_trace_arg *args, int nargs,
18 struct bpf_insn *new_prog, size_t *new_cnt,
21 #include <linux/compiler.h>
25 bpf__gen_prologue(struct probe_trace_arg *args __maybe_unused,
26 int nargs __maybe_unused,
27 struct bpf_insn *new_prog __maybe_unused,
29 size_t cnt_space __maybe_unused)
37 #endif /* __BPF_PROLOGUE_H */