On Sat, Jun 17, 2023 at 4:41 AM Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> wrote: > > On Mon, Jun 12, 2023 at 8:16 AM Yafang Shao <laoar.shao@xxxxxxxxx> wrote: > > > > Enhance bpftool to display comprehensive information about exposed > > perf_event links, covering uprobe, kprobe, tracepoint, and generic perf > > event. The resulting output will include the following details: > > > > $ tools/bpf/bpftool/bpftool link show > > 3: perf_event prog 14 > > event_type software event_config cpu-clock > > bpf_cookie 0 > > pids perf_event(1379330) > > 4: perf_event prog 14 > > event_type hw-cache event_config LLC-load-misses > > bpf_cookie 0 > > pids perf_event(1379330) > > 5: perf_event prog 14 > > event_type hardware event_config cpu-cycles > > how about > > "event hardware:cpu-cycles" for events Agree. That is better. > > > bpf_cookie 0 > > pids perf_event(1379330) > > 6: perf_event prog 20 > > retprobe 0 file_name /home/yafang/bpf/uprobe/a.out offset 0x1338 > > for uprobes: "uprobe /home/yafang/bpf/uprobe/a.out+0x1338" > for retprobes: "uretprobe /home/yafang/bpf/uprobe/a.out+0x1338" Agree. > > > bpf_cookie 0 > > pids uprobe(1379706) > > 7: perf_event prog 21 > > retprobe 1 file_name /home/yafang/bpf/uprobe/a.out offset 0x1338 > > bpf_cookie 0 > > pids uprobe(1379706) > > 8: perf_event prog 27 > > tp_name sched_switch > > "tracepoint sched_switch" ? Agree. > > > bpf_cookie 0 > > pids tracepoint(1381734) > > 10: perf_event prog 43 > > retprobe 0 func_name kernel_clone addr ffffffffad0a9660 > > similar to uprobes: > > "kprobe kernel_clone 0xffffffffad0a9660" > "kretprobe kernel_clone 0xffffffffad0a9660" > > > That is, make this more human readable instead of mechanically > translated from kernel info? retprobe 1/0 is quite cumbersome, > "uprobe" vs "uretprobe" makes more sense? Agree. Will do it. > > JSON is where it could be completely mechanically translated, IMO. Agree. -- Regards Yafang