From cd85ab8af77cbd7dd5cfba3b7e5a174ab6882e70 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Sun, 3 Dec 2017 13:44:55 -0500 Subject: [PATCH] Bug 1422734 - move --enable-small-chunk-size to moz.configure; r=chmanchester --- build/moz.configure/old.configure | 1 - js/moz.configure | 11 +++++++++++ js/src/old-configure.in | 13 ------------- mobile/android/confvars.sh | 3 --- mobile/android/moz.configure | 1 + 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure index 043ca2170452..0561fa8957b5 100644 --- a/build/moz.configure/old.configure +++ b/build/moz.configure/old.configure @@ -214,7 +214,6 @@ def old_configure_options(*options): '--enable-reflow-perf', '--enable-sandbox', '--enable-signmar', - '--enable-small-chunk-size', '--enable-startup-notification', '--enable-startupcache', '--enable-stdcxx-compat', diff --git a/js/moz.configure b/js/moz.configure index 4075cb516d9c..399fc9e75dac 100644 --- a/js/moz.configure +++ b/js/moz.configure @@ -282,6 +282,17 @@ set_define('JS_GC_ZEAL', depends_if('--enable-gczeal')(lambda _: True)) +# Use a smaller chunk size for GC chunks +# ======================================================== +# Use large (1MB) chunks by default. This option can be used to give +# smaller (currently 256K) chunks. +js_option('--enable-small-chunk-size', + help='Allocate memory for JS GC things in smaller chunks') + +set_define('JS_GC_SMALL_CHUNK_SIZE', + depends(when='--enable-small-chunk-size')(lambda: True)) + + # Trace logging. # ======================================================= js_option('--enable-trace-logging', diff --git a/js/src/old-configure.in b/js/src/old-configure.in index 95a054ce335b..62904fbd2ade 100644 --- a/js/src/old-configure.in +++ b/js/src/old-configure.in @@ -1490,19 +1490,6 @@ fi AC_SUBST(MOZ_GLUE_IN_PROGRAM) AC_SUBST_LIST(MOZ_GLUE_WRAP_LDFLAGS) -dnl ======================================================== -dnl = Use a smaller chunk size for GC chunks -dnl ======================================================== -dnl Use large (1MB) chunks by default. For B2G this option is used to give -dnl smaller (currently 256K) chunks. -MOZ_ARG_ENABLE_BOOL(small-chunk-size, -[ --enable-small-chunk-size Allocate memory for JS GC things in smaller chunks], - JS_GC_SMALL_CHUNK_SIZE=1, - JS_GC_SMALL_CHUNK_SIZE= ) -if test -n "$JS_GC_SMALL_CHUNK_SIZE"; then - AC_DEFINE(JS_GC_SMALL_CHUNK_SIZE) -fi - dnl ======================================================== dnl = Use Valgrind dnl ======================================================== diff --git a/mobile/android/confvars.sh b/mobile/android/confvars.sh index 261e4d4b7947..e1b507396c84 100644 --- a/mobile/android/confvars.sh +++ b/mobile/android/confvars.sh @@ -40,8 +40,5 @@ MOZ_USE_NATIVE_POPUP_WINDOWS=1 MOZ_APP_ID={aa3c5121-dab2-40e2-81ca-7ea25febc110} -# Use the low-memory GC tuning. -export JS_GC_SMALL_CHUNK_SIZE=1 - # Enable checking that add-ons are signed by the trusted root MOZ_ADDON_SIGNING=1 diff --git a/mobile/android/moz.configure b/mobile/android/moz.configure index e31882deedcf..11ee3a5f33af 100644 --- a/mobile/android/moz.configure +++ b/mobile/android/moz.configure @@ -98,6 +98,7 @@ set_config('MOZ_ANDROID_MOZILLA_ONLINE', imply_option('MOZ_SERVICES_HEALTHREPORT', True) imply_option('MOZ_ANDROID_HISTORY', True) +imply_option('--enable-small-chunk-size', True) set_config('ANDROID_SUPPORT_LIBRARY_VERSION', '23.4.0') add_old_configure_assignment('ANDROID_SUPPORT_LIBRARY_VERSION', '23.4.0')