Bug 762448 - Bump opt.lg_dirty_mult in jemalloc3 to reduce number of dirty pages. r=glandium
authorGuilherme Goncalves <guilherme.p.gonc@gmail.com>
Tue, 23 Dec 2014 06:01:00 -0500
changeset 221377 495ecf1836228489f3780ea28e289427cba75da6
parent 221376 9d2a1e5945331d83e863b7a059992a760f8465f7
child 221378 725c5cf6db6cb317f8b2bc6301780ef2eabb7a9f
push id28019
push userryanvm@gmail.com
push dateFri, 26 Dec 2014 19:40:56 +0000
treeherdermozilla-central@893064841be2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs762448
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 762448 - Bump opt.lg_dirty_mult in jemalloc3 to reduce number of dirty pages. r=glandium
memory/build/jemalloc_config.c
--- a/memory/build/jemalloc_config.c
+++ b/memory/build/jemalloc_config.c
@@ -5,17 +5,28 @@
 #ifdef MOZ_JEMALLOC3
 
 #define MOZ_JEMALLOC_IMPL
 
 #include "mozmemory_wrap.h"
 #include "mozilla/Types.h"
 
 /* Override some jemalloc defaults */
-MFBT_DATA const char * je_(malloc_conf) = "narenas:1,lg_chunk:20,tcache:false";
+#ifdef MOZ_B2G
+/* we tolerate around 4MiB of dirty pages on most platforms, except for B2G,
+ * where our limit is 1MiB
+ */
+#define MOZ_MALLOC_PLATFORM_OPTIONS ",lg_dirty_mult:8"
+#else
+#define MOZ_MALLOC_PLATFORM_OPTIONS ",lg_dirty_mult:6"
+#endif
+
+#define MOZ_MALLOC_OPTIONS "narenas:1,lg_chunk:20,tcache:false"
+MFBT_DATA const char * je_(malloc_conf) =
+  MOZ_MALLOC_OPTIONS MOZ_MALLOC_PLATFORM_OPTIONS;
 
 #ifdef ANDROID
 #include <android/log.h>
 
 static void
 _je_malloc_message(void *cbopaque, const char *s)
 {
   __android_log_print(ANDROID_LOG_INFO, "GeckoJemalloc", "%s", s);