Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: build/android/envsetup.sh

Issue 22976005: Android: Set GOMA_COMPILER_PROXY_THREADS to a reasonable value (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/envsetup.sh
diff --git a/build/android/envsetup.sh b/build/android/envsetup.sh
index f9e3e5ede1f0b74e5c21f1d95a2108ae5a6613d9..cacfafc79c60eb7c50e27a9c070aaf0dfab43bc8 100755
--- a/build/android/envsetup.sh
+++ b/build/android/envsetup.sh
@@ -143,6 +143,14 @@ fi
ANDROID_GOMA_WRAPPER=""
if [[ -d $GOMA_DIR ]]; then
ANDROID_GOMA_WRAPPER="$GOMA_DIR/gomacc"
+ num_cores="$(grep --count ^processor /proc/cpuinfo)"
+# Goma is IO-ish you want more threads than you have cores.
+ let goma_threads=num_cores*2
+ if [ -z "${GOMA_COMPILER_PROXY_THREADS}" -a "${goma_threads}" -gt 16 ]; then
+# The default is 16 threads, if the machine has many cores we crank it up a bit
+ GOMA_COMPILER_PROXY_THREADS="${goma_threads}"
+ export GOMA_COMPILER_PROXY_THREADS
+ fi
fi
export ANDROID_GOMA_WRAPPER
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698