1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2022 Meta Platforms, Inc. and affiliates. */
5 #include <bpf/bpf_tracing.h>
6 #include <bpf/bpf_helpers.h>
8 struct bpf_testmod_struct_arg_1 {
11 struct bpf_testmod_struct_arg_2 {
16 struct bpf_testmod_struct_arg_3 {
21 struct bpf_testmod_struct_arg_4 {
26 long t1_a_a, t1_a_b, t1_b, t1_c, t1_ret, t1_nregs;
27 __u64 t1_reg0, t1_reg1, t1_reg2, t1_reg3;
28 long t2_a, t2_b_a, t2_b_b, t2_c, t2_ret;
29 long t3_a, t3_b, t3_c_a, t3_c_b, t3_ret;
30 long t4_a_a, t4_b, t4_c, t4_d, t4_e_a, t4_e_b, t4_ret;
33 long t7_a, t7_b, t7_c, t7_d, t7_e, t7_f_a, t7_f_b, t7_ret;
34 long t8_a, t8_b, t8_c, t8_d, t8_e, t8_f_a, t8_f_b, t8_g, t8_ret;
37 SEC("fentry/bpf_testmod_test_struct_arg_1")
38 int BPF_PROG2(test_struct_arg_1, struct bpf_testmod_struct_arg_2, a, int, b, int, c)
47 SEC("fexit/bpf_testmod_test_struct_arg_1")
48 int BPF_PROG2(test_struct_arg_2, struct bpf_testmod_struct_arg_2, a, int, b, int, c, int, ret)
50 t1_nregs = bpf_get_func_arg_cnt(ctx);
52 bpf_get_func_arg(ctx, 0, &t1_reg0);
54 bpf_get_func_arg(ctx, 1, &t1_reg1);
56 bpf_get_func_arg(ctx, 2, &t1_reg2);
57 t1_reg2 = (int)t1_reg2;
59 bpf_get_func_arg(ctx, 3, &t1_reg3);
60 t1_reg3 = (int)t1_reg3;
66 SEC("fentry/bpf_testmod_test_struct_arg_2")
67 int BPF_PROG2(test_struct_arg_3, int, a, struct bpf_testmod_struct_arg_2, b, int, c)
76 SEC("fexit/bpf_testmod_test_struct_arg_2")
77 int BPF_PROG2(test_struct_arg_4, int, a, struct bpf_testmod_struct_arg_2, b, int, c, int, ret)
83 SEC("fentry/bpf_testmod_test_struct_arg_3")
84 int BPF_PROG2(test_struct_arg_5, int, a, int, b, struct bpf_testmod_struct_arg_2, c)
93 SEC("fexit/bpf_testmod_test_struct_arg_3")
94 int BPF_PROG2(test_struct_arg_6, int, a, int, b, struct bpf_testmod_struct_arg_2, c, int, ret)
100 SEC("fentry/bpf_testmod_test_struct_arg_4")
101 int BPF_PROG2(test_struct_arg_7, struct bpf_testmod_struct_arg_1, a, int, b,
102 int, c, int, d, struct bpf_testmod_struct_arg_2, e)
113 SEC("fexit/bpf_testmod_test_struct_arg_4")
114 int BPF_PROG2(test_struct_arg_8, struct bpf_testmod_struct_arg_1, a, int, b,
115 int, c, int, d, struct bpf_testmod_struct_arg_2, e, int, ret)
121 SEC("fentry/bpf_testmod_test_struct_arg_5")
122 int BPF_PROG2(test_struct_arg_9)
127 SEC("fexit/bpf_testmod_test_struct_arg_5")
128 int BPF_PROG2(test_struct_arg_10, int, ret)
134 SEC("fentry/bpf_testmod_test_struct_arg_6")
135 int BPF_PROG2(test_struct_arg_11, struct bpf_testmod_struct_arg_3 *, a)
141 SEC("fentry/bpf_testmod_test_struct_arg_7")
142 int BPF_PROG2(test_struct_arg_12, __u64, a, void *, b, short, c, int, d,
143 void *, e, struct bpf_testmod_struct_arg_4, f)
155 SEC("fexit/bpf_testmod_test_struct_arg_7")
156 int BPF_PROG2(test_struct_arg_13, __u64, a, void *, b, short, c, int, d,
157 void *, e, struct bpf_testmod_struct_arg_4, f, int, ret)
163 SEC("fentry/bpf_testmod_test_struct_arg_8")
164 int BPF_PROG2(test_struct_arg_14, __u64, a, void *, b, short, c, int, d,
165 void *, e, struct bpf_testmod_struct_arg_4, f, int, g)
178 SEC("fexit/bpf_testmod_test_struct_arg_8")
179 int BPF_PROG2(test_struct_arg_15, __u64, a, void *, b, short, c, int, d,
180 void *, e, struct bpf_testmod_struct_arg_4, f, int, g,
187 char _license[] SEC("license") = "GPL";