mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02: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:
parent
fe9c8cb2b5
commit
630e85a9f0
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -469,6 +469,11 @@ struct bpf_link_create_opts {
|
|||
__u32 relative_id;
|
||||
__u64 expected_revision;
|
||||
} cgroup;
|
||||
struct {
|
||||
const __u32 *ids;
|
||||
const __u64 *cookies;
|
||||
__u32 cnt;
|
||||
} tracing_multi;
|
||||
};
|
||||
size_t :0;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user