[go: nahoru, domu]

orderfile: reduce RAM usage when linking

The symbol_level was switched to 2 recently (crrev.com/729971). This
works on general builders, but on the orderfile bot with less RAM
onboard the LLD hits an OOM after swapping a lot.

Attempt to mitigate this by switching symbol_level back to 1. This may be
not enough because there were other changes making ThinLTO smarter.
Those could consume a lot of RAM potentially as well.

Bug: 1041096
Change-Id: I034939b7ca9b04990a2f2d3ac8205a085cb0b8fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2000819
Reviewed-by: George Burgess <gbiv@chromium.org>
Commit-Queue: George Burgess <gbiv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#731655}
diff --git a/tools/cygprofile/orderfile_generator_backend.py b/tools/cygprofile/orderfile_generator_backend.py
index 612102c..4306868 100755
--- a/tools/cygprofile/orderfile_generator_backend.py
+++ b/tools/cygprofile/orderfile_generator_backend.py
@@ -288,6 +288,7 @@
         'is_chrome_branded=' + str(not self._public).lower(),
         'is_debug=false',
         'is_official_build=true',
+        'symbol_level=1',  # to fit 30 GiB RAM on the bot when LLD is running
         'target_os="android"',
         'use_goma=' + str(self._use_goma).lower(),
         'use_order_profiling=' + str(instrumented).lower(),