Commit 82dbdb85 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Revert "build: adjust ThinLTO's memory usage for non-Android"

This reverts commit 0e9a0b02.

Reason for revert: Breaks Linux CFI bot, see https://crbug.com/997103

Original change's description:
> build: adjust ThinLTO's memory usage for non-Android
> 
> In the linked bug, we discovered that clean Chrome links with ThinLTO
> enabled consume quite a bit of memory. In my measurements, Chrome OS x64
> links take around 49GB, and a standard Linux ThinLTO link takes around
> 46GB.
> 
> Build command:
>   $ /usr/bin/time -v ninja chrome
>   [snip]
>   Maximum resident set size (kbytes): 46337504
>   [snip]
>   $ cat args.gn
>   target_os = "linux"
>   target_cpu = "x64"
>   use_goma = true
>   is_official_build = true
>   is_chrome_branded = true
>   clang_use_default_sample_profile = true
>   use_thin_lto = true
> 
> (the last two args should be redundant in this case)
> 
> Measured similarly, Android's build takes 8-9GB on ARM, so it gets to
> stay at 10GB.
> 
> Bug: 988364
> Change-Id: Ia1bbf6b441dcb9219a37842060e72eebe7ec687e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1755189
> Reviewed-by: Peter Collingbourne <pcc@chromium.org>
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Commit-Queue: George Burgess <gbiv@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#689090}

TBR=thakis@chromium.org,pcc@chromium.org,gbiv@chromium.org,inglorion@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 988364
Change-Id: Icfab0c6b2bd4d08b524d6c32a456026af15543bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1768816Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689904}
parent 9a082050
...@@ -21,15 +21,10 @@ declare_args() { ...@@ -21,15 +21,10 @@ declare_args() {
if (concurrent_links == -1) { if (concurrent_links == -1) {
if (use_thin_lto) { if (use_thin_lto) {
_args = [ "--reserve_mem_gb=10" ] _args = [
# On Chrome OS and Linux, ThinLTO peaks at a bit above 45GB for Chrome. "--mem_per_link_gb=10",
# Android links weigh in much smaller, at around 8-10GB of working memory "--reserve_mem_gb=10",
# (measured by /usr/bin/time -v). ]
if (is_android) {
_args += [ "--mem_per_link_gb=10" ]
} else {
_args += [ "--mem_per_link_gb=45" ]
}
} else if (use_sanitizer_coverage || use_fuzzing_engine) { } else if (use_sanitizer_coverage || use_fuzzing_engine) {
# Sanitizer coverage instrumentation increases linker memory consumption # Sanitizer coverage instrumentation increases linker memory consumption
# significantly. # significantly.
......
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