On Wed, May 31, 2023 at 8:31 AM Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote: > > On Sun, May 28, 2023 at 02:20:22PM +0000, Yafang Shao wrote: > > Show the already expose kprobe_multi link info in bpftool. The result as > > follows, > > > > $ bpftool link show > > 2: kprobe_multi prog 11 > > func_cnt 4 addrs ffffffffaad475c0 ffffffffaad47600 > > ffffffffaad47640 ffffffffaad47680 > > pids trace(10936) > > > > $ bpftool link show -j > > [{"id":1,"type":"perf_event","prog_id":5,"bpf_cookie":0,"pids":[{"pid":10658,"comm":"trace"}]},{"id":2,"type":"kprobe_multi","prog_id":11,"func_cnt":4,"addrs":[18446744072280634816,18446744072280634880,18446744072280634944,18446744072280635008],"pids":[{"pid":10936,"comm":"trace"}]},{"id":120,"type":"iter","prog_id":266,"target_name":"bpf_map"},{"id":121,"type":"iter","prog_id":267,"target_name":"bpf_prog"}] > > > > $ bpftool link show | grep -A 1 "func_cnt" | \ > > awk '{if (NR == 1) {print $4; print $5;} else {print $1; print $2} }' | \ > > awk '{"grep " $1 " /proc/kallsyms" | getline f; print f;}' > > This is not human friendly. > Either make bpftool print complete info or don't do it all. > I will make bpftool print complete info in the next version. -- Regards Yafang