Bug 1015602 - Populate chunksize/bin_unused for MOZ_JEMALLOC3 as they're now used after bug 1006769. r=erahm
authorJan Beich <jbeich@tormail.org>
Sat, 24 May 2014 06:41:00 -0400
changeset 198073 57dd204266baefbaa4f8ba3f8d997e0b781338b5
parent 198072 a476db2df3a36d286fed4e6e8c84610e1670a3a3
child 198074 3e62fb5c42355f48447ec798edab3f254e2d9098
push id5990
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:40:24 +0000
treeherdermozilla-aurora@0796197efbc9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm
bugs1015602, 1006769
milestone32.0a1
Bug 1015602 - Populate chunksize/bin_unused for MOZ_JEMALLOC3 as they're now used after bug 1006769. r=erahm
memory/build/mozjemalloc_compat.c
--- a/memory/build/mozjemalloc_compat.c
+++ b/memory/build/mozjemalloc_compat.c
@@ -61,34 +61,38 @@ malloc_good_size_impl(size_t size)
   return size;
 }
 
 MOZ_JEMALLOC_API void
 jemalloc_stats_impl(jemalloc_stats_t *stats)
 {
   unsigned narenas;
   size_t active, allocated, mapped, page, pdirty;
+  size_t lg_chunk;
 
   CTL_GET("arenas.narenas", narenas);
   CTL_GET("arenas.page", page);
   CTL_GET("stats.active", active);
   CTL_GET("stats.allocated", allocated);
   CTL_GET("stats.mapped", mapped);
+  CTL_GET("opt.lg_chunk", lg_chunk);
 
   /* get the summation for all arenas, i == narenas */
   CTL_I_GET("stats.arenas.0.pdirty", pdirty, narenas);
 
+  stats->chunksize = 1 << lg_chunk;
   stats->mapped = mapped;
   stats->allocated = allocated;
   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;
+  stats->bin_unused = 0;
 }
 
 MOZ_JEMALLOC_API void
 jemalloc_purge_freed_pages_impl()
 {
 }
 
 MOZ_JEMALLOC_API void