From mboxrd@z Thu Jan 1 00:00:00 1970 From: Okash Khawaja Subject: [PATCH bpf-next 0/3] bpf: btf: json print btf info with bpftool map dump Date: Wed, 20 Jun 2018 13:30:51 -0700 Message-ID: <20180620203051.223156973@fb.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , To: Daniel Borkmann , Martin KaFai Lau , Alexei Starovoitov , Yonghong Song , Quentin Monnet , Jakub Kicinski , "David S. Miller" Return-path: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Hi, These patches augment the bpftool's map dump command with BTF info. In particular, when user runs `bpftool map dump [-j|-p] id `, they will see map data formatted and tagged based upon BTF information associated with that map. Here is what each patch does: Patch 1 exports BTF functions inside libbpf, to be used by patch 2. Patch 2 adds btf_dumper which uses type info exported in patch 1 along with json_writer to json print or pretty json print map values alongside btf debug info. Patch 3 uses btf_dumper to json or pretty print map values when -j or -p flag is specified to `btf map dump`. Further details are included in patch descriptions. Thanks, Okash