[LLVMdev] On LLD performance

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Mar 13 10:15:25 PDT 2015


>> Curiously lld produces a tiny got.dyn (0x0000a0 bytes), not sure why
>> it is not included in .got.
>
> I have a fix for this. Will merge it.

Thanks.

>> .rodata: 9 449 278 bytes bigger
>> .eh_frame: 438 376 bytes bigger
>> .comment: 77 797 bytes bigger
>> .data.rel.ro: 48 056 bytes bigger
>
> Did you try --merge-strings with lld ? --gc-sections


I got

warning: ignoring unknown argument: --gc-sections

I will do a run with --merge-strings. This should probably the the
default to match other ELF linkers.

>> The biggest difference that shows up is that lld has 1,152 context
>> switches, but the cpu utilization is still < 1. Maybe there is just a
>> threading bug somewhere?
>
> lld apparently is highly multithreaded, but I see your point.  May be trying
> to do this exercise on /dev/shm can show more cpu utilization ?

Yes, the number just under 1 cpu utilized is very suspicious. As Rui
points out, there is probably some issue in the threading
implementation on linux. One interesting experiment would be timing
gold and lld linking ELF on windows (but I have only a windows VM and
no idea what the "perf" equivalent is on windows.

I forgot to mention, the tests were run on tmpfs already.

Cheers,
Rafael



More information about the llvm-dev mailing list