Bug 1544651 - Print nursery size in KB for JS_GC_PROFILE_NURSERY r=jonco
authorPaul Bone <pbone@mozilla.com>
Thu, 18 Apr 2019 03:14:56 +0000
changeset 469975 c7379d0731ad3f17facc4bb7de8c55e35bd442bd
parent 469974 841e248130aeed83a650c3a2049310946279efa8
child 469976 081a659775d32b167cb0e74b7fb0e7ab1aee7a62
push id35884
push userapavel@mozilla.com
push dateThu, 18 Apr 2019 21:35:00 +0000
treeherdermozilla-central@74dc09642c22 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1544651
milestone68.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 1544651 - Print nursery size in KB for JS_GC_PROFILE_NURSERY r=jonco Differential Revision: https://phabricator.services.mozilla.com/D27642
js/src/gc/Nursery.cpp
--- a/js/src/gc/Nursery.cpp
+++ b/js/src/gc/Nursery.cpp
@@ -878,18 +878,19 @@ void js::Nursery::collect(JS::GCReason r
 
   stats().endNurseryCollection(reason);
   gcTracer.traceMinorGCEnd();
   timeInChunkAlloc_ = mozilla::TimeDuration();
 
   if (enableProfiling_ && totalTime >= profileThreshold_) {
     stats().maybePrintProfileHeaders();
 
-    fprintf(stderr, "MinorGC: %20s %5.1f%% %4u        ",
-            JS::ExplainGCReason(reason), promotionRate * 100, maxChunkCount());
+    fprintf(stderr, "MinorGC: %20s %5.1f%% %5zu       ",
+            JS::ExplainGCReason(reason), promotionRate * 100,
+            capacity() / 1024);
     printProfileDurations(profileDurations_);
 
     if (reportTenurings_) {
       for (auto& entry : tenureCounts.entries) {
         if (entry.count >= reportTenurings_) {
           fprintf(stderr, "  %d x ", entry.count);
           AutoSweepObjectGroup sweep(entry.group);
           entry.group->print(sweep);