From 7483a7a70a12d7c00c9f80574d533b01689d39a7 Mon Sep 17 00:00:00 2001 From: Quentin Monnet Date: Wed, 5 Apr 2023 14:21:19 +0100 Subject: bpftool: Support printing opcodes and source file references in CFG Add support for displaying opcodes or/and file references (filepath, line and column numbers) when dumping the control flow graphs of loaded BPF programs with bpftool. The filepaths in the records are absolute. To avoid blocks on the graph to get too wide, we truncate them when they get too long (but we always keep the entire file name). In the unlikely case where the resulting file name is ambiguous, it remains possible to get the full path with a regular dump (no CFG). Signed-off-by: Quentin Monnet Link: https://lore.kernel.org/r/20230405132120.59886-7-quentin@isovalent.com Signed-off-by: Alexei Starovoitov --- tools/bpf/bpftool/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/bpf/bpftool/main.h') diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpftool/main.h index e9ee514b22d4..00d11ca6d3f2 100644 --- a/tools/bpf/bpftool/main.h +++ b/tools/bpf/bpftool/main.h @@ -230,7 +230,7 @@ void btf_dump_linfo_plain(const struct btf *btf, void btf_dump_linfo_json(const struct btf *btf, const struct bpf_line_info *linfo, bool linum); void btf_dump_linfo_dotlabel(const struct btf *btf, - const struct bpf_line_info *linfo); + const struct bpf_line_info *linfo, bool linum); struct nlattr; struct ifinfomsg; -- cgit v1.2.3-58-ga151