New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 735126 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug

Blocked on:
issue 746505

Blocking:
issue 607968



Sign in to add a comment

In linux debug builds, lld is 15% - 157% slower than gold

Project Member Reported by thakis@chromium.org, Jun 20 2017

Issue description

I built target 'chrome', first fully, by running this three times:

time ninja -C out/gn -j1000 chrome -t clean
time ninja -C out/gn -j1000 chrome

Then I tested incremental builds of content by running this three times:

touch content/child/child_process.cc
time ninja -C out/gn -j1000 chrome

Then blink_core (3x as well):

ttouch third_party/WebKit/Source/core/paint/ListMarkerPainter.cpp
time ninja -C out/gn -j1000 chrome

Finally chrome (3x):

touch chrome/browser/browser_process.cc
time ninja -C out/gn -j1000 chrome


I first did this with this args.gn:
use_goma = true

Then I repeated everything with this args.gn:
use_goma = true
use_lld = true


Here are the numbers:

gold:
full: 6m1.0s, 4m17.6s, 3m51.6s 4m38s (I had to sync and start over after the 3rd build, so take the first 3 numbers with a grain of salt; everything else is at #480858)
content incremental: 19.3, 18.5, 17.9, 17.6
blink_core incremental:  19.0, 18.9 (only did this twice)
chrome incremental: 32s, 31.9s

lld:
full: 6m3.7s, 5m31.6s, 5m15s
content incremental: 22.2s, 22.21s, 22.4s
blink_core incremental:  49.1s, 49.6s, 48.1s
chrome incremental: 36.1s, 35.2s, 33.6s9s


So in full builds, lld seems to benefit less from disk cache warm-up. In incremental builds, where ninja will only call clang for one cc file, and then lld for one link, lld is between 15% and 157% slower.

Given that lld is supposed to be much faster than gold, this surprised me. Maybe its debug fission emission code hasn't been tuned much yet?

(I filed  issue 735101  about lld printing a few warnings during the build.)
 

Comment 1 by thakis@chromium.org, Jun 20 2017

pcc mentioned --gdb-index in the other bug, so I reran this without --gdb-index.

gold:
full: 5m9.3s, 11m14.827s 6m30s
content: 16.5s, 16.8s, 16.5s
blink: 18.2s, 17.9s, 18.0s
chrome: 27.2s, 28.6s, 26.3s

ldd:
full: 12m7.3s, 4m29.5s, 5m53.9s
content: 11.5s, 11.5s, 12.8s
blink: 21.5s, 19.0s, 18.6s
chrome: 16.4s, 17.1s, 15.9s


(the varying "full:" times are due to goma 503'ing, I'd ignore the 'full:' line.)

So generally faster on content and chrome, but a tiny bit slower on blink_core.

Since --gdb-index speeds up loading chrome into gdb from 4min to 35s, it'd be good if using it wouldn't make lld take twice as long :-)

Comment 2 by thakis@chromium.org, Jun 27 2017

https://cs.chromium.org/chromium/src/build/config/compiler/BUILD.gn?type=cs&q=use_debug_fission+file:%5C.gn&l=130 also means that we disable fission when using lld. I'm not sure if that's intentional -- does lld support fission?

Comment 3 by ruiu@google.com, Jun 27 2017

No, it doesn't.
Labels: TE-NeedsTriageHelp
As this issue related to linux builds,could some one from dev team please look into this issue.
Adding 'TE-NeedsTriageHelp' label for further investgation.
Thanks..!!

Comment 5 by p...@chromium.org, Jul 11 2017

Looks like --gdb-index could be getting significantly faster soon: https://reviews.llvm.org/D35236

Comment 7 by thakis@chromium.org, Jul 21 2017

Blockedon: 746505
That landed in r308544
Components: Build
Is this fixed? Comment 7 linked to the wrong CL.

Comment 9 by p...@chromium.org, Mar 13 2018

Status: Fixed (was: Unconfirmed)
Yes, both of those patches landed (comment 7 referred to an LLVM CL).

Sign in to add a comment