Re: Questions about the state of some BTF features

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

 



On Fri, Oct 25, 2024 at 9:15 AM Alan Maguire <alan.maguire@xxxxxxxxxx> wrote:
>
> On 25/10/2024 17:09, Alexei Starovoitov wrote:
> > On Thu, Oct 24, 2024 at 4:26 PM Andrii Nakryiko
> > <andrii.nakryiko@xxxxxxxxx> wrote:
> >>
> >>>
> >>> The good news is that already happens, provided you have the updated
> >>> pahole to handle distilled base generation. After building selftests I see
> >>>
> >>> $ objdump -h bpf_testmod.ko |grep BTF
> >>>   7 .BTF_ids      000001c8  0000000000000000  0000000000000000  00002c50
> >>>  2**0
> >>>  50 .BTF          000036f4  0000000000000000  0000000000000000  0006e048
> >>>  2**0
> >>>  51 .BTF.base     000004cc  0000000000000000  0000000000000000  0007173c
> >>>  2**0
> >>>
> >>
> >> Indeed, after updating to the latest pahole master now I get
> >> .BTF.base, very nice.
> >
> > I pulled the latest pahole, rebuilt everything,
> > but still cannot get it to generate BTF.base.
> >
> > Any special trick needed?
>
> Hmm, should just work for bpf_testmod.ko as long as "pahole
> --supported_btf_features" reports "distilled_base" among the set of
> features. scripts/Makefile.btf should add that feature if KBUILD_EXTMOD
> is set, as it should be in the case of building bpf_testmod.ko. I'll
> double-check at my end with latest bpf-next, but it was working
> yesterday for me.

There must be something else necessary:

pahole -J -j --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func,decl_tag_kfuncs
--lang_exclude=rust --btf_features=distilled_base --btf_base vmlinux
.../bpf/bpf_testmod/bpf_testmod.ko; .../resolve_btfids -b vmlinux
.../selftests/bpf/bpf_testmod/bpf_testmod.ko;

objdump -h .../testing/selftests/bpf/bpf_testmod/bpf_testmod.ko|grep BTF
  7 .BTF_ids      000001c8  0000000000000000  0000000000000000  00001d94  2**0
 50 .BTF          00002ea7  0000000000000000  0000000000000000  00062e30  2**0





[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