Re: [PATCH v2 bpf-next] Add CONFIG_DEBUG_INFO_BTF check to bpftool feature command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2021-02-20 05:13 UTC+0000 ~ grantseltzer <grantseltzer@xxxxxxxxx>
> This adds the CONFIG_DEBUG_INFO_BTF kernel compile option to output of
> the bpftool feature command. This is relevant for developers that want
> to use libbpf to account for data structure definition differences
> between kernels.
> 
> Signed-off-by: grantseltzer <grantseltzer@xxxxxxxxx>
> ---
>  tools/bpf/bpftool/feature.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
> index 359960a8f..34343e7fa 100644
> --- a/tools/bpf/bpftool/feature.c
> +++ b/tools/bpf/bpftool/feature.c
> @@ -336,6 +336,8 @@ static void probe_kernel_image_config(const char *define_prefix)
>  		{ "CONFIG_BPF_JIT", },
>  		/* Avoid compiling eBPF interpreter (use JIT only) */
>  		{ "CONFIG_BPF_JIT_ALWAYS_ON", },
> +		/* Enable using BTF debug information */
> +		{ "CONFIG_DEBUG_INFO_BTF", },

Nit: The comment is slightly misleading, you can use BTF to list program
C instructions or map structures without this option for example. Maybe
something like this?

	/* Kernel BTF debug information available */

Thanks for the patch!
Quentin



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux