Bug 1291356 - Enable multiple jemalloc arenas for MOZ_STYLO builds. r?glandium draft
authorCameron McCormack <cam@mcc.id.au>
Fri, 26 Aug 2016 20:21:48 +0900
changeset 406083 641fe5dd1c315697583b7c6cae55d7aabebd3154
parent 405868 55b177dea806ba2a2d2d4a28f2b02b0b9e028199
child 529577 a6c93873287347d0a95edbd03bb471f3231039bd
push id27639
push userbmo:mh+mozilla@glandium.org
push dateFri, 26 Aug 2016 11:23:01 +0000
reviewersglandium
bugs1291356
milestone51.0a1
Bug 1291356 - Enable multiple jemalloc arenas for MOZ_STYLO builds. r?glandium
memory/mozjemalloc/jemalloc.c
--- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c
@@ -138,18 +138,24 @@
 #ifndef MOZ_MEMORY_DEBUG
 #  define	MALLOC_PRODUCTION
 #endif
 
 /*
  * Use only one arena by default.  Mozilla does not currently make extensive
  * use of concurrent allocation, so the increased fragmentation associated with
  * multiple arenas is not warranted.
+ *
+ * When using the Servo style system, we do indeed make use of significant
+ * concurrent allocation, and the overhead matters. Bug 1291355 tracks
+ * investigating the fragmentation overhead of turning this on for users.
  */
-#define	MOZ_MEMORY_NARENAS_DEFAULT_ONE
+#ifndef MOZ_STYLO
+#define MOZ_MEMORY_NARENAS_DEFAULT_ONE
+#endif
 
 /*
  * Pass this set of options to jemalloc as its default. It does not override
  * the options passed via the MALLOC_OPTIONS environment variable but is
  * applied in addition to them.
  */
 #ifdef MOZ_WIDGET_GONK
     /* Reduce the amount of unused dirty pages to 1MiB on B2G */