Lines Matching refs:opts

64 static void test_link_api(struct bpf_link_create_opts *opts)  in test_link_api()  argument
75 link1_fd = bpf_link_create(prog_fd, 0, BPF_TRACE_KPROBE_MULTI, opts); in test_link_api()
79 opts->kprobe_multi.flags = BPF_F_KPROBE_MULTI_RETURN; in test_link_api()
81 link2_fd = bpf_link_create(prog_fd, 0, BPF_TRACE_KPROBE_MULTI, opts); in test_link_api()
103 LIBBPF_OPTS(bpf_link_create_opts, opts); in test_link_api_addrs()
115 opts.kprobe_multi.addrs = (const unsigned long*) addrs; in test_link_api_addrs()
116 opts.kprobe_multi.cnt = ARRAY_SIZE(addrs); in test_link_api_addrs()
117 test_link_api(&opts); in test_link_api_addrs()
122 LIBBPF_OPTS(bpf_link_create_opts, opts); in test_link_api_syms()
134 opts.kprobe_multi.syms = syms; in test_link_api_syms()
135 opts.kprobe_multi.cnt = ARRAY_SIZE(syms); in test_link_api_syms()
136 test_link_api(&opts); in test_link_api_syms()
140 test_attach_api(const char *pattern, struct bpf_kprobe_multi_opts *opts) in test_attach_api() argument
151 pattern, opts); in test_attach_api()
155 if (opts) { in test_attach_api()
156 opts->retprobe = true; in test_attach_api()
158 pattern, opts); in test_attach_api()
163 kprobe_multi_test_run(skel, !!opts); in test_attach_api()
173 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts); in test_attach_api_pattern()
175 test_attach_api("bpf_fentry_test*", &opts); in test_attach_api_pattern()
181 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts); in test_attach_api_addrs()
193 opts.addrs = (const unsigned long *) addrs; in test_attach_api_addrs()
194 opts.cnt = ARRAY_SIZE(addrs); in test_attach_api_addrs()
195 test_attach_api(NULL, &opts); in test_attach_api_addrs()
200 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts); in test_attach_api_syms()
212 opts.syms = syms; in test_attach_api_syms()
213 opts.cnt = ARRAY_SIZE(syms); in test_attach_api_syms()
214 test_attach_api(NULL, &opts); in test_attach_api_syms()
219 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts); in test_attach_api_fails()
253 opts.addrs = (const unsigned long *) addrs; in test_attach_api_fails()
254 opts.syms = syms; in test_attach_api_fails()
255 opts.cnt = ARRAY_SIZE(syms); in test_attach_api_fails()
256 opts.cookies = NULL; in test_attach_api_fails()
259 NULL, &opts); in test_attach_api_fails()
268 opts.addrs = (const unsigned long *) addrs; in test_attach_api_fails()
269 opts.syms = NULL; in test_attach_api_fails()
270 opts.cnt = ARRAY_SIZE(syms); in test_attach_api_fails()
271 opts.cookies = NULL; in test_attach_api_fails()
274 "ksys_*", &opts); in test_attach_api_fails()
283 opts.addrs = NULL; in test_attach_api_fails()
284 opts.syms = NULL; in test_attach_api_fails()
285 opts.cnt = ARRAY_SIZE(syms); in test_attach_api_fails()
286 opts.cookies = NULL; in test_attach_api_fails()
289 "ksys_*", &opts); in test_attach_api_fails()
298 opts.addrs = NULL; in test_attach_api_fails()
299 opts.syms = NULL; in test_attach_api_fails()
300 opts.cnt = 0; in test_attach_api_fails()
301 opts.cookies = cookies; in test_attach_api_fails()
304 "ksys_*", &opts); in test_attach_api_fails()
313 opts.addrs = (const unsigned long *) addrs; in test_attach_api_fails()
314 opts.syms = NULL; in test_attach_api_fails()
315 opts.cnt = INT_MAX; in test_attach_api_fails()
316 opts.cookies = NULL; in test_attach_api_fails()
319 NULL, &opts); in test_attach_api_fails()
335 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts); in test_session_skel_api()
371 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts); in test_session_cookie_skel_api()
402 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts); in test_unique_match()
410 opts.unique_match = true; in test_unique_match()
413 "bpf_fentry_test*", &opts); in test_unique_match()
418 "bpf_fentry_test8*", &opts); in test_unique_match()
639 static void do_bench_test(struct kprobe_multi_empty *skel, struct bpf_kprobe_multi_opts *opts) in do_bench_test() argument
648 NULL, opts); in do_bench_test()
661 printf("%s: found %lu functions\n", __func__, opts->cnt); in do_bench_test()
668 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts); in test_kprobe_multi_bench_attach()
680 opts.syms = (const char **) syms; in test_kprobe_multi_bench_attach()
681 opts.cnt = cnt; in test_kprobe_multi_bench_attach()
683 do_bench_test(skel, &opts); in test_kprobe_multi_bench_attach()
693 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts); in test_kprobe_multi_bench_attach_addr()
712 opts.addrs = addrs; in test_kprobe_multi_bench_attach_addr()
713 opts.cnt = cnt; in test_kprobe_multi_bench_attach_addr()
715 do_bench_test(skel, &opts); in test_kprobe_multi_bench_attach_addr()