Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Issue 2848113002: clang: Link lld against tcmalloc. (Closed)

Created:
3 years, 7 months ago by pcc1
Modified:
3 years, 5 months ago
Reviewers:
krasin1, Nico, hans
CC:
chromium-reviews, eugenis+clang_chromium.org, vmpstr+watch_chromium.org, Lei Zhang, dsinclair, yunlian, glider+clang_chromium.org, Nico, ukai+watch_chromium.org, Reid Kleckner, dmikurube+clang_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

clang: Link lld against tcmalloc. We may want to link the rest of the toolchain against tcmalloc, but for now this just eliminates a difference between lld and gold, which should help fix a perf regression when switching to lld. BUG=607968 R=thakis@chromium.org,krasin@chromium.org Review-Url: https://codereview.chromium.org/2848113002 Cr-Commit-Position: refs/heads/master@{#471422} Committed: https://chromium.googlesource.com/chromium/src/+/36be29e9bff22ab7cb6acce2ac66270a805117f2

Patch Set 1 #

Total comments: 2

Patch Set 2 : Copy the .so into the clang package instead of depending on the one in binutils, and fix the test s… #

Patch Set 3 : Refresh #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -8 lines) Patch
M tools/clang/scripts/package.py View 1 2 chunks +8 lines, -0 lines 0 comments Download
M tools/clang/scripts/update.py View 1 2 5 chunks +14 lines, -8 lines 0 comments Download

Messages

Total messages: 29 (14 generated)
pcc1
3 years, 7 months ago (2017-04-28 23:14:30 UTC) #1
pcc1
Oh, and I will upload a package once the issue mentioned in crbug.com/714769 is fixed.
3 years, 7 months ago (2017-04-28 23:20:18 UTC) #2
hans
On 2017/04/28 23:20:18, pcc1 wrote: > Oh, and I will upload a package once the ...
3 years, 7 months ago (2017-04-28 23:23:21 UTC) #3
hans
https://codereview.chromium.org/2848113002/diff/1/tools/clang/scripts/update.py File tools/clang/scripts/update.py (right): https://codereview.chromium.org/2848113002/diff/1/tools/clang/scripts/update.py#newcode570 tools/clang/scripts/update.py:570: '-Wl,-rpath,\\$ORIGIN/../../../binutils/Linux_x64/Release/lib'] Does package.py need an update to include the ...
3 years, 7 months ago (2017-04-28 23:23:27 UTC) #5
pcc1
https://codereview.chromium.org/2848113002/diff/1/tools/clang/scripts/update.py File tools/clang/scripts/update.py (right): https://codereview.chromium.org/2848113002/diff/1/tools/clang/scripts/update.py#newcode570 tools/clang/scripts/update.py:570: '-Wl,-rpath,\\$ORIGIN/../../../binutils/Linux_x64/Release/lib'] On 2017/04/28 23:23:26, hans wrote: > Does package.py ...
3 years, 7 months ago (2017-04-28 23:27:16 UTC) #6
hans
On 2017/04/28 23:27:16, pcc1 wrote: > https://codereview.chromium.org/2848113002/diff/1/tools/clang/scripts/update.py > File tools/clang/scripts/update.py (right): > > https://codereview.chromium.org/2848113002/diff/1/tools/clang/scripts/update.py#newcode570 > ...
3 years, 7 months ago (2017-04-28 23:38:23 UTC) #7
pcc1
On 2017/04/28 23:38:23, hans wrote: > On 2017/04/28 23:27:16, pcc1 wrote: > > > https://codereview.chromium.org/2848113002/diff/1/tools/clang/scripts/update.py ...
3 years, 7 months ago (2017-04-29 00:00:46 UTC) #8
Nico
How much of a speedup are we talking here? On Apr 28, 2017 8:00 PM, ...
3 years, 7 months ago (2017-04-29 00:49:34 UTC) #9
chromium-reviews
I measured about 10% (median of 5 runs) linking base_unittests. Haven't measured any larger targets, ...
3 years, 7 months ago (2017-04-29 00:57:00 UTC) #10
Nico
Ah it was in a comment, sorry, I had only looked at the cl description. ...
3 years, 7 months ago (2017-04-29 01:33:30 UTC) #11
pcc1
I think it's worth it for full LTO. Arguably less so for ThinLTO, but as ...
3 years, 7 months ago (2017-04-29 02:14:20 UTC) #12
hans
The two red bots are due to crbug.com/721492 which is unrelated. lgtm
3 years, 7 months ago (2017-05-12 15:44:46 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2848113002/40001
3 years, 7 months ago (2017-05-12 17:31:06 UTC) #25
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/36be29e9bff22ab7cb6acce2ac66270a805117f2
3 years, 7 months ago (2017-05-12 20:06:59 UTC) #28
pcc1
3 years, 5 months ago (2017-06-28 00:42:56 UTC) #29
Message was sent while issue was closed.
On 2017/04/29 02:14:20, pcc1 wrote:
> I think it's worth it for full LTO. Arguably less so for ThinLTO, but as we
> recently discovered it seems likely that ThinLTO won't be ready for a few
weeks.
> 
> I'd like to continue moving to lld+ThinLTO by changing one variable at a time.
> The first variable I'd like to change is the linker, but not the allocator.
> Happy to re-evaluate once ThinLTO launches though.

I measured this again with ThinLTO.

With tcmalloc (median of 6): 42.29s
With glibc malloc: 44.61s

So it looks like the cost is closer to 5% now. I think I'd be happy with glibc
malloc for now, and re-evaluating for the toolchain as a whole at a later time.

I'm working on a CL that will stop building the gold plugin, and at the same
time I'll switch lld back to glibc malloc.

Powered by Google App Engine
This is Rietveld 408576698