Bug 899880 - Fix jemalloc3 so it works after bug 898558, which changed jemalloc's stats struct. r=glandium
authorJustin Lebar <justin.lebar@gmail.com>
Thu, 01 Aug 2013 16:37:54 -0700
changeset 153301 25fa0d94a5073f5bf1890dc65c9d9c249e4ac4d1
parent 153300 a2ad91794485a6037136fbcafbb97a4eb94339ba
child 153302 ab3c575381b2f1d831b8552f8bbad7a80e107108
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs899880, 898558
milestone25.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 899880 - Fix jemalloc3 so it works after bug 898558, which changed jemalloc's stats struct. r=glandium
memory/build/mozjemalloc_compat.c
--- a/memory/build/mozjemalloc_compat.c
+++ b/memory/build/mozjemalloc_compat.c
@@ -71,20 +71,24 @@ jemalloc_stats_impl(jemalloc_stats_t *st
   CTL_GET("arenas.page", page);
   CTL_GET("stats.active", active);
   CTL_GET("stats.allocated", allocated);
   CTL_GET("stats.mapped", mapped);
 
   /* get the summation for all arenas, i == narenas */
   CTL_I_GET("stats.arenas.0.pdirty", pdirty, narenas);
 
+  stats->mapped = mapped;
   stats->allocated = allocated;
-  stats->mapped = mapped;
-  stats->dirty = pdirty * page;
-  stats->committed = active + stats->dirty;
+  stats->waste = active - allocated;
+  stats->page_cache = pdirty * page;
+
+  // We could get this value out of base.c::base_pages, but that really should
+  // be an upstream change, so don't worry about it for now.
+  stats->bookkeeping = 0;
 }
 
 MOZ_JEMALLOC_API void
 jemalloc_purge_freed_pages_impl()
 {
 }
 
 MOZ_JEMALLOC_API void