mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
b0dc037399
Displaying cookies for kprobe multi link, in plain mode: # bpftool link ... 1397: kprobe_multi prog 47532 kretprobe.multi func_cnt 3 addr cookie func [module] ffffffff82b370c0 3 bpf_fentry_test1 ffffffff82b39780 1 bpf_fentry_test2 ffffffff82b397a0 2 bpf_fentry_test3 And in json mode: # bpftool link -j | jq ... { "id": 1397, "type": "kprobe_multi", "prog_id": 47532, "retprobe": true, "func_cnt": 3, "missed": 0, "funcs": [ { "addr": 18446744071607382208, "func": "bpf_fentry_test1", "module": null, "cookie": 3 }, { "addr": 18446744071607392128, "func": "bpf_fentry_test2", "module": null, "cookie": 1 }, { "addr": 18446744071607392160, "func": "bpf_fentry_test3", "module": null, "cookie": 2 } ] } Cookie is attached to specific address, and because we sort addresses before printing, we need to sort cookies the same way, hence adding the struct addr_cookie to keep and sort them together. Also adding missing dd.sym_count check to show_kprobe_multi_json. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Song Liu <song@kernel.org> Link: https://lore.kernel.org/r/20240119110505.400573-9-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org> |
||
---|---|---|
.. | ||
bash-completion | ||
Documentation | ||
skeleton | ||
.gitignore | ||
btf_dumper.c | ||
btf.c | ||
cfg.c | ||
cfg.h | ||
cgroup.c | ||
common.c | ||
feature.c | ||
gen.c | ||
iter.c | ||
jit_disasm.c | ||
json_writer.c | ||
json_writer.h | ||
link.c | ||
main.c | ||
main.h | ||
Makefile | ||
map_perf_ring.c | ||
map.c | ||
net.c | ||
netlink_dumper.c | ||
netlink_dumper.h | ||
perf.c | ||
pids.c | ||
prog.c | ||
struct_ops.c | ||
tracelog.c | ||
xlated_dumper.c | ||
xlated_dumper.h |