mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-03 23:29:06 +08:00
bpf: Add cookie to perf_event bpf_link_info records
At the moment we don't store cookie for perf_event probes, while we do that for the rest of the probes. Adding cookie fields to struct bpf_link_info perf event probe records: perf_event.uprobe perf_event.kprobe perf_event.tracepoint perf_event.perf_event And the code to store that in bpf_link_info struct. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Song Liu <song@kernel.org> Acked-by: Yafang Shao <laoar.shao@gmail.com> Link: https://lore.kernel.org/r/20240119110505.400573-2-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
committed by
Andrii Nakryiko
parent
390c6234eb
commit
de2f366450
@@ -6582,6 +6582,7 @@ struct bpf_link_info {
|
|||||||
__aligned_u64 file_name; /* in/out */
|
__aligned_u64 file_name; /* in/out */
|
||||||
__u32 name_len;
|
__u32 name_len;
|
||||||
__u32 offset; /* offset from file_name */
|
__u32 offset; /* offset from file_name */
|
||||||
|
__u64 cookie;
|
||||||
} uprobe; /* BPF_PERF_EVENT_UPROBE, BPF_PERF_EVENT_URETPROBE */
|
} uprobe; /* BPF_PERF_EVENT_UPROBE, BPF_PERF_EVENT_URETPROBE */
|
||||||
struct {
|
struct {
|
||||||
__aligned_u64 func_name; /* in/out */
|
__aligned_u64 func_name; /* in/out */
|
||||||
@@ -6589,14 +6590,19 @@ struct bpf_link_info {
|
|||||||
__u32 offset; /* offset from func_name */
|
__u32 offset; /* offset from func_name */
|
||||||
__u64 addr;
|
__u64 addr;
|
||||||
__u64 missed;
|
__u64 missed;
|
||||||
|
__u64 cookie;
|
||||||
} kprobe; /* BPF_PERF_EVENT_KPROBE, BPF_PERF_EVENT_KRETPROBE */
|
} kprobe; /* BPF_PERF_EVENT_KPROBE, BPF_PERF_EVENT_KRETPROBE */
|
||||||
struct {
|
struct {
|
||||||
__aligned_u64 tp_name; /* in/out */
|
__aligned_u64 tp_name; /* in/out */
|
||||||
__u32 name_len;
|
__u32 name_len;
|
||||||
|
__u32 :32;
|
||||||
|
__u64 cookie;
|
||||||
} tracepoint; /* BPF_PERF_EVENT_TRACEPOINT */
|
} tracepoint; /* BPF_PERF_EVENT_TRACEPOINT */
|
||||||
struct {
|
struct {
|
||||||
__u64 config;
|
__u64 config;
|
||||||
__u32 type;
|
__u32 type;
|
||||||
|
__u32 :32;
|
||||||
|
__u64 cookie;
|
||||||
} event; /* BPF_PERF_EVENT_EVENT */
|
} event; /* BPF_PERF_EVENT_EVENT */
|
||||||
};
|
};
|
||||||
} perf_event;
|
} perf_event;
|
||||||
|
|||||||
Reference in New Issue
Block a user