On Fri, Jun 10, 2022 at 09:58:02AM -0700, Stanislav Fomichev wrote: > @@ -84,6 +87,19 @@ static int show_bpf_prog(int id, enum bpf_attach_type attach_type, > } > > attach_type_str = libbpf_bpf_attach_type_str(attach_type); > + > + if (btf_vmlinux && > + info.attach_btf_id < btf__type_cnt(btf_vmlinux)) { > + /* Note, we ignore info.attach_btf_obj_id for now. There > + * is no good way to resolve btf_id to vmlinux > + * or module btf. > + */ On usage could be using it to get the btf_info by bpf_obj_get_info_by_fd. Check for the kernel_btf == true and name is "vmlinux". To be future proof, it can print <unknown> func for anything other than "vmlinux" btf.