summaryrefslogtreecommitdiff
path: root/tools/bpf/bpftool/cfg.h
diff options
context:
space:
mode:
authorQuentin Monnet <quentin@isovalent.com>2023-04-05 16:21:19 +0300
committerAlexei Starovoitov <ast@kernel.org>2023-04-06 07:27:27 +0300
commit7483a7a70a12d7c00c9f80574d533b01689d39a7 (patch)
tree48cade4a372739780e2bf09db0a13ff3c7aa400d /tools/bpf/bpftool/cfg.h
parent9b79f02722bbf24f060b2ab79513ad6e22c8e2f0 (diff)
downloadlinux-7483a7a70a12d7c00c9f80574d533b01689d39a7.tar.xz
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 <quentin@isovalent.com> Link: https://lore.kernel.org/r/20230405132120.59886-7-quentin@isovalent.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf/bpftool/cfg.h')
-rw-r--r--tools/bpf/bpftool/cfg.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/cfg.h b/tools/bpf/bpftool/cfg.h
index 909d17e6d4c2..b3793f4e1783 100644
--- a/tools/bpf/bpftool/cfg.h
+++ b/tools/bpf/bpftool/cfg.h
@@ -6,6 +6,7 @@
#include "xlated_dumper.h"
-void dump_xlated_cfg(struct dump_data *dd, void *buf, unsigned int len);
+void dump_xlated_cfg(struct dump_data *dd, void *buf, unsigned int len,
+ bool opcodes, bool linum);
#endif /* __BPF_TOOL_CFG_H */