Bug 762448 - Deduct bin_unused from waste in jemalloc3's stats. r=glandium
authorGuilherme Goncalves <guilherme.p.gonc@gmail.com>
Wed, 12 Nov 2014 13:00:00 -0500
changeset 238114 9d2a1e5945331d83e863b7a059992a760f8465f7
parent 238113 b67489a65e49751b2b8f5c0d0fae26ef4f225c83
child 238115 495ecf1836228489f3780ea28e289427cba75da6
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 - Deduct bin_unused from waste in jemalloc3's stats. r=glandium
memory/build/mozjemalloc_compat.c
--- a/memory/build/mozjemalloc_compat.c
+++ b/memory/build/mozjemalloc_compat.c
@@ -161,16 +161,17 @@ jemalloc_stats_impl(jemalloc_stats_t *st
   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 = compute_bin_unused(narenas);
+  stats->waste -= stats->bin_unused;
 }
 
 MOZ_JEMALLOC_API void
 jemalloc_purge_freed_pages_impl()
 {
 }
 
 MOZ_JEMALLOC_API void