Skip to content

Commit 6b12bb2

Browse files
grantseltzeranakryiko
authored andcommitted
Add kernel/modules BTF presence checks to bpftool feature command
This adds both the CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES kernel compile option to output of the bpftool feature command. This is relevant for developers that want to account for data structure definition differences between kernels. Signed-off-by: Grant Seltzer <grantseltzer@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Martin KaFai Lau <kafai@fb.com> Link: https://lore.kernel.org/bpf/20210222195846.155483-1-grantseltzer@gmail.com
1 parent d310ec0 commit 6b12bb2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/bpf/bpftool/feature.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,10 @@ static void probe_kernel_image_config(const char *define_prefix)
336336
{ "CONFIG_BPF_JIT", },
337337
/* Avoid compiling eBPF interpreter (use JIT only) */
338338
{ "CONFIG_BPF_JIT_ALWAYS_ON", },
339+
/* Kernel BTF debug information available */
340+
{ "CONFIG_DEBUG_INFO_BTF", },
341+
/* Kernel module BTF debug information available */
342+
{ "CONFIG_DEBUG_INFO_BTF_MODULES", },
339343

340344
/* cgroups */
341345
{ "CONFIG_CGROUPS", },

0 commit comments

Comments
 (0)