New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 617429 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

We should pass more arguments to get_concurrent_links.py to tune the answer better

Project Member Reported by dpranke@chromium.org, Jun 5 2016

Issue description

From brucedawson in https://codereview.chromium.org/2031233002 :

> Should we pass along more arguments to control the calculation? For instance, on
> Windows Debug builds use significantly more memory than release builds.
> Component builds and win_fastlink builds both use significantly less (and
> component win_fastlink builds use very little).
> 
> LTCG on Windows also increases memory usage - about as much as debug
> non-component builds.


 
Cc: dpranke@chromium.org
Labels: Build-Tools-GN Proj-GN-Migration
Labels: -Proj-GN-Migration
This doesn't block the GN migration.

Comment 4 by boliu@chromium.org, Aug 17 2016

Cc: boliu@chromium.org
ran into something similar on android, static+debug is at 20GB right now

would it be better to just pass in the memory per linker into the script, and keep the matrix of configuration in gn?
that seems like a good suggestion.
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 24 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/da2a0136724678276ff3d00307edb0d9c9baf4c2

commit da2a0136724678276ff3d00307edb0d9c9baf4c2
Author: boliu <boliu@chromium.org>
Date: Wed Aug 24 15:58:15 2016

build: Refactor get_concurrent_links.py

Instead of passing build config arguments to the python
script, allow caller to provide the memory needed per linker
and the amount of memory to reserve. Then move the logic
specific to build config to gn file, which is a better place
in case the logic gets more complicated in the future.

Then clean up the script. Factor out a function to get the
total ram of system, and unify the logic for calculating the
number of concurrent links.

Note this intends to be a no-op change, but refactored code
is not identical, and there may be corner case differences.

BUG=617429

Review-Url: https://codereview.chromium.org/2259503002
Cr-Commit-Position: refs/heads/master@{#414084}

[modify] https://crrev.com/da2a0136724678276ff3d00307edb0d9c9baf4c2/build/toolchain/concurrent_links.gni
[modify] https://crrev.com/da2a0136724678276ff3d00307edb0d9c9baf4c2/build/toolchain/get_concurrent_links.py

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3fbd5a693a788cf963ac8d009ef120239f56e9c2

commit 3fbd5a693a788cf963ac8d009ef120239f56e9c2
Author: boliu <boliu@chromium.org>
Date: Tue Aug 30 04:05:41 2016

build: Tweak linker memory usage for android static build

Manually measured using top that linker can use ~25G of memory linking
unit_tests_apk.

BUG=617429

Review-Url: https://codereview.chromium.org/2282943002
Cr-Commit-Position: refs/heads/master@{#415072}

[modify] https://crrev.com/3fbd5a693a788cf963ac8d009ef120239f56e9c2/build/toolchain/concurrent_links.gni

Sign in to add a comment