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 238115 495ecf1836228489f3780ea28e289427cba75da6
parent 238114 9d2a1e5945331d83e863b7a059992a760f8465f7
child 238116 725c5cf6db6cb317f8b2bc6301780ef2eabb7a9f
push id7472
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 20:36:27 +0000
treeherdermozilla-aurora@300ca104f8fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs762448
milestone37.0a1
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);