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 148595 25fa0d94a5073f5bf1890dc65c9d9c249e4ac4d1
parent 148594 a2ad91794485a6037136fbcafbb97a4eb94339ba
child 148596 ab3c575381b2f1d831b8552f8bbad7a80e107108
push id4085
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 20:29:25 +0000
treeherdermozilla-aurora@ede8780a15bc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs899880, 898558
milestone25.0a1
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