Re: [PATCH v2 dwarves 0/5] btf_encoder: implement shared elf_functions table

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

 



On Wed, 2024-10-09 at 23:35 +0000, Ihor Solodrai wrote:
> This version of the patchset rebases the changes on top of next
> (a1241b0).
> 
> In comparison to v1, elf_functions_entry struct and related code is
> removed.
> 
> Originally (even before I submitted v1) I used gobuffer to store a
> collection of elf_function-s. But that used too much memory, because
> gobuffer allocates big chunks, and these lists mostly contain just a
> few elements.  This prompted me to switch to a list in v1.
> 
> While rebasing I realized that we may avoid maintaining a mutex for
> each elf_functions_entry if list updates are made atomically. With
> that change it became obvious that elf_functions_entry abstraction is
> unnecessary, so I removed it.
> 
> Also I removed reallocarray_grow logic, which was used for
> elf_functions->entries. I noticed that the number of functions (at
> least in vmlinux) is almost as big as the number of ELF symbols, and
> we can use this to pre-allocate the entire table and then adjust after
> function collection is complete.

I tested this thing sequentially applying patches 1 through 5 and
executing command [1] (same as used for kernel build) and generating
vmlinux.h from resulting BTF, at each step generated vmlinux.h was the
same as for current 'next' (modulo usual small fluctuations).

[1] pahole --btf_encode_detached=... -J -j \
    --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func,decl_tag_kfuncs

[...]






[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux