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. I'll try to figure out the reason for slowdown tomorrow. [1] https://github.com/eddyz87/dwarves/tree/sort-btf