On 04/04/2024 01:08, Eduard Zingerman wrote: > On Tue, 2024-04-02 at 16:39 -0300, Arnaldo Carvalho de Melo wrote: >> Hi, >> >> This allows us to have reproducible builds while keeping the >> DWARF loading phase in parallel, achieving a noticeable speedup as >> showed in the commit log messages: > > [...] > >> Working on libbpf to allow for parallel reproducible BTF encoding is the >> next step. > > Another option would be to apply some sort of canonical ordering to > BTF itself. E.g. put all PTR before STRUCT, sort same kinds by name, > sort same kinds by vlen, etc. Something akin to [1], however this > experiment has several flaws: > - slowdown is much worse than with your patch-set; > - I see a small number of functions with identical names appearing and > disappearing from final BTF. > Could that be the handling of functions with same name, inconsistent prototypes? We leave them out deliberately (see btf_encoder__add_saved_funcs(). > I'll try to figure out the reason for slowdown tomorrow. > > [1] https://github.com/eddyz87/dwarves/tree/sort-btf >