Commit a769e96d authored by krasin's avatar krasin Committed by Commit bot

ThinLTO: limit link / codegen parallelism to 16.

Based on the experiments, ThinLTO does not scale beyond that,
and the default setting is the number of cores on a machine, which
is often 32 or more for Chrome devs, where ThinLTO is slower than at 16:
https://docs.google.com/spreadsheets/d/18vi9p8ffIYNVPTyxtJwr-YrP4WJRbaQr_2nZ1AKKBs4/edit?usp=sharing

BUG=645295

Review-Url: https://codereview.chromium.org/2341983002
Cr-Commit-Position: refs/heads/master@{#418789}
parent e2196439
...@@ -434,7 +434,13 @@ config("compiler") { ...@@ -434,7 +434,13 @@ config("compiler") {
if (!is_debug && (allow_posix_link_time_opt || is_cfi) && !is_nacl) { if (!is_debug && (allow_posix_link_time_opt || is_cfi) && !is_nacl) {
if (use_thin_lto) { if (use_thin_lto) {
cflags += [ "-flto=thin" ] cflags += [ "-flto=thin" ]
ldflags += [ "-flto=thin" ] ldflags += [
"-flto=thin",
# Limit the parallelism to the sweet spot on most of the machines.
# As of now, ThinLTO does not scale beyond 16 cores anyway.
"-Wl,-plugin-opt,jobs=16",
]
} else { } else {
# Note: ThinLTO does not currently have this feature implemented # Note: ThinLTO does not currently have this feature implemented
# For Full LTO, it provides a measurable runtime speedup of Chrome. # For Full LTO, it provides a measurable runtime speedup of Chrome.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment