When a map is storing a kernel's struct, its map_info->btf_vmlinux_value_type_id is set. The first map type supporting it is BPF_MAP_TYPE_STRUCT_OPS. This series adds support to dump this kind of map with BTF. The first two patches are bug fixes which only applicable to in bpf-next. Please see individual patches for details. Martin KaFai Lau (5): bpftool: Fix a leak of btf object bpftool: Fix missing BTF output for json during map dump libbpf: Expose bpf_find_kernel_btf to libbpf_internal.h bpftool: Add struct_ops map name bpftool: Support dumping a map with btf_vmlinux_value_type_id tools/bpf/bpftool/map.c | 84 ++++++++++++++++++--------------- tools/lib/bpf/libbpf.c | 3 +- tools/lib/bpf/libbpf_internal.h | 1 + 3 files changed, 49 insertions(+), 39 deletions(-) -- 2.17.1