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. > > A patch splitting btf_encoder__collect_symbols became unnecessary and > is removed. Do you have the performance / memory usage stats for next vs this patch-set? [...]