Hi everyone. I had a discussion off-list with Eduard and Andrii and we came to an agreement on the next iteration of this series. Patches #3 and #7 will be changed: since there is only one encoder now, there is no reason to maintain global state, such as list of btf_encoders and list of elf_functions structs and corresponding locks. Refactoring about separating elf_functions from btf_encoder will largely remain, but the object itself will live in the btf_encoder. Patch #10 (dwarf_loader workers) will be modified to use only one conditional variable as Eduard suggested [1]. Andrii and I also ran a bunch of experiments to understand why after a certain point adding more threads noticeably slows down the processing. It turns out that with the number of jobs growing, the dwarf loading threads start competing for memory allocation in cu__zalloc. This can be partially mitigated by setting a larger obstack chunk size. I will add a relevant patch in the next version of the series. [1] https://lore.kernel.org/dwarves/58dc053c9d47a18124d8711604b08acbc6400340.camel@xxxxxxxxx