Revert "Reduce link pool to stop android-archive-rel OOM'ing"
This reverts commit 393e7114bf6f2856eaf8147ec5d0c5f79849f115.
Reason for revert: Proper fix landed (see bug).
Original change's description:
> Reduce link pool to stop android-archive-rel OOM'ing
>
> I'd like to still work on a fix that doesn't reduce the size for bots
> with less RAM, but need something quick'ish to fix bot.
>
> Bug: 1098333
> Change-Id: Ifdfe8f07712e5073419ea0c0c0eb89092c31a1de
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2347384
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Commit-Queue: Dirk Pranke <dpranke@google.com>
> Auto-Submit: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Cr-Commit-Position: refs/heads/master@{#796585}
TBR=dpranke@google.com,agrieve@chromium.org
Change-Id: I6b445001d0a8ab57d16f3ba2623906da1b509d37
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1098333
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2349398
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796896}
diff --git a/build/toolchain/concurrent_links.gni b/build/toolchain/concurrent_links.gni
index c4637454..1f427ee6 100644
--- a/build/toolchain/concurrent_links.gni
+++ b/build/toolchain/concurrent_links.gni
@@ -45,30 +45,21 @@
} else {
_args = [ "--mem_per_link_gb=4" ]
}
- } else if (is_android) {
+ } else if (is_android && !is_component_build && symbol_level == 2) {
+ # Full debug symbols require large memory for link.
+ _args = [ "--mem_per_link_gb=25" ]
+ } else if (is_android && !is_debug && !using_sanitizer && is_java_debug &&
+ disable_android_lint && symbol_level < 2) {
# The link pool is also shared with:
- # * R8
- # * 10gb per run for 72-core machine MonochromePublic.apk, Aug 2020.
- # * 4.5gb per run for 8-core machine MonochromePublic.apk, Aug 2020.
+ # * ProGuard / R8
# * Android Lint
- # * 2gb per run for MonochromePublic.apk, Aug 2020.
- if (!is_component_build && symbol_level == 2) {
- # Full debug symbols require large memory for link.
- _args = [ "--mem_per_link_gb=25" ]
- } else if (!is_java_debug) {
- # R8 requires more ram than linker.
- # TODO(crbug.com/1098333): Do not decrease on bots with low CPU counts.
- _args = [ "--mem_per_link_gb=10" ]
- } else if (!is_debug && !using_sanitizer && symbol_level < 2) {
- # Increase the number of concurrent links for release bots that have
- # ProGuard and sanitizers disabled (which use a lot of RAM).
- if (symbol_level == 1) {
- _args = [ "--mem_per_link_gb=6" ]
- } else {
- _args = [ "--mem_per_link_gb=4" ]
- }
+ # Increase the number of concurrent links for release bots that have
+ # ProGuard and Lint disabled, and that do not enable sanitizers (which use a
+ # lot of RAM).
+ if (symbol_level == 1) {
+ _args = [ "--mem_per_link_gb=6" ]
} else {
- _args = []
+ _args = [ "--mem_per_link_gb=4" ]
}
} else if (is_linux && !is_chromeos && symbol_level == 0) {
# Memory consumption on link without debug symbols is low on linux.