Lines Matching refs:opts

63 static void test_link_api(struct bpf_link_create_opts *opts)
74 link1_fd = bpf_link_create(prog_fd, 0, BPF_TRACE_KPROBE_MULTI, opts);
78 opts->kprobe_multi.flags = BPF_F_KPROBE_MULTI_RETURN;
80 link2_fd = bpf_link_create(prog_fd, 0, BPF_TRACE_KPROBE_MULTI, opts);
102 LIBBPF_OPTS(bpf_link_create_opts, opts);
114 opts.kprobe_multi.addrs = (const unsigned long*) addrs;
115 opts.kprobe_multi.cnt = ARRAY_SIZE(addrs);
116 test_link_api(&opts);
121 LIBBPF_OPTS(bpf_link_create_opts, opts);
133 opts.kprobe_multi.syms = syms;
134 opts.kprobe_multi.cnt = ARRAY_SIZE(syms);
135 test_link_api(&opts);
139 test_attach_api(const char *pattern, struct bpf_kprobe_multi_opts *opts)
150 pattern, opts);
154 if (opts) {
155 opts->retprobe = true;
157 pattern, opts);
162 kprobe_multi_test_run(skel, !!opts);
172 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts);
174 test_attach_api("bpf_fentry_test*", &opts);
180 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts);
192 opts.addrs = (const unsigned long *) addrs;
193 opts.cnt = ARRAY_SIZE(addrs);
194 test_attach_api(NULL, &opts);
199 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts);
211 opts.syms = syms;
212 opts.cnt = ARRAY_SIZE(syms);
213 test_attach_api(NULL, &opts);
218 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts);
241 /* fail_1 - pattern and opts NULL */
252 opts.addrs = (const unsigned long *) addrs;
253 opts.syms = syms;
254 opts.cnt = ARRAY_SIZE(syms);
255 opts.cookies = NULL;
258 NULL, &opts);
267 opts.addrs = (const unsigned long *) addrs;
268 opts.syms = NULL;
269 opts.cnt = ARRAY_SIZE(syms);
270 opts.cookies = NULL;
273 "ksys_*", &opts);
282 opts.addrs = NULL;
283 opts.syms = NULL;
284 opts.cnt = ARRAY_SIZE(syms);
285 opts.cookies = NULL;
288 "ksys_*", &opts);
297 opts.addrs = NULL;
298 opts.syms = NULL;
299 opts.cnt = 0;
300 opts.cookies = cookies;
303 "ksys_*", &opts);
312 opts.addrs = (const unsigned long *) addrs;
313 opts.syms = NULL;
314 opts.cnt = INT_MAX;
315 opts.cookies = NULL;
318 NULL, &opts);
334 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts);
370 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts);
613 static void do_bench_test(struct kprobe_multi_empty *skel, struct bpf_kprobe_multi_opts *opts)
622 NULL, opts);
635 printf("%s: found %lu functions\n", __func__, opts->cnt);
642 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts);
654 opts.syms = (const char **) syms;
655 opts.cnt = cnt;
657 do_bench_test(skel, &opts);
667 LIBBPF_OPTS(bpf_kprobe_multi_opts, opts);
686 opts.addrs = addrs;
687 opts.cnt = cnt;
689 do_bench_test(skel, &opts);