mirror of
https://github.com/netdata/libbpf.git
synced 2026-11-05 17:30:15 +08:00
libbpf: Add bpf_link_create support for tracing_multi link
Adding bpf_link_create support for tracing_multi link with new tracing_multi record in struct bpf_link_create_opts. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20260606123955.345967-19-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
1 parent
a7f4cd68de
commit
0adf8326d8
2 files changed
+14
No files matched your search
@@ -845,6 +845,15 @@ int bpf_link_create(int prog_fd, int target_fd,
|
||||
if (!OPTS_ZEROED(opts, uprobe_multi))
|
||||
return libbpf_err(-EINVAL);
|
||||
break;
|
||||
case BPF_TRACE_FENTRY_MULTI:
|
||||
case BPF_TRACE_FEXIT_MULTI:
|
||||
case BPF_TRACE_FSESSION_MULTI:
|
||||
attr.link_create.tracing_multi.ids = ptr_to_u64(OPTS_GET(opts, tracing_multi.ids, 0));
|
||||
attr.link_create.tracing_multi.cookies = ptr_to_u64(OPTS_GET(opts, tracing_multi.cookies, 0));
|
||||
attr.link_create.tracing_multi.cnt = OPTS_GET(opts, tracing_multi.cnt, 0);
|
||||
if (!OPTS_ZEROED(opts, tracing_multi))
|
||||
return libbpf_err(-EINVAL);
|
||||
break;
|
||||
case BPF_TRACE_RAW_TP:
|
||||
case BPF_TRACE_FENTRY:
|
||||
case BPF_TRACE_FEXIT:
|
||||
|
||||
Reference in new issue
Block a user