Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

lld/mac is very slow to link lld when debug symbols are present #49944

Open Quuxplusone opened 3 years ago

Quuxplusone commented 3 years ago
Bugzilla Link PR50975
Status NEW
Importance P enhancement
Reported by Nico Weber (nicolasweber@gmx.de)
Reported on 2021-07-03 19:05:52 -0700
Last modified on 2021-10-22 13:58:51 -0700
Version unspecified
Hardware PC All
CC dblaikie@gmail.com, gkm@fb.com, jezreel@gmail.com, llvm-bugs@lists.llvm.org, smeenai@fb.com, vyng@google.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
1. Enable line tables (`-g1`) for building, e.g. with symbol_level=1 in the gn
build
2. Build lld, use lld as host linker

Expected: Fast
Actual: It takes 14 seconds to link lld (compared to 9.5s with ld64).

I can upload a repro file if that's useful (it's 840MB uncompressed).
Quuxplusone commented 3 years ago

I can upload a repro file if that's useful (it's 840MB uncompressed).

Would be useful yeah, I'd like to have a look

Quuxplusone commented 3 years ago

Gah, that was the old "use unoptimized build to measure stuff" problem again. /me hangs head in shame

With an optimized build, lld still takes 3s, which subjectively feels too big of a slowdown relative to a release build. But at least it's comfortably faster than ld64.

So I uploaded the repro anyways, here it is: https://drive.google.com/file/d/1tnaTp9mgmTS1h0pHpUvRZaSMSHVMzzJF/view?usp=sharing (184 MB compressed, 840 MB uncompressed, probably nice test case anyways -- it's an unoptimized (no -O flag) -g1 build. Maybe that's just that much more data -- but maybe we also do something silly with debug info.)

But definitely less bad than I though -- apologies again for that.