Bug 1517409 - (part 3) Rename Statustics::preBytes to preHeapSize r=jonco
authorPaul Bone <pbone@mozilla.com>
Tue, 15 Jan 2019 11:44:48 +1100
changeset 514397 4b29deaac54a9d52b32d2ecdd000c4da06f6ac86
parent 514396 6c747052bceb38167dfc798a7d92fd6269fde95f
child 514398 9ac2f47b3cc21276f6d8306175a4f428dcd4378f
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1517409
milestone66.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 1517409 - (part 3) Rename Statustics::preBytes to preHeapSize r=jonco
js/src/gc/Statistics.cpp
js/src/gc/Statistics.h
--- a/js/src/gc/Statistics.cpp
+++ b/js/src/gc/Statistics.cpp
@@ -322,17 +322,17 @@ UniqueChars Statistics::formatCompactSum
 
   SprintfLiteral(buffer,
                  "Zones: %d of %d (-%d); Compartments: %d of %d (-%d); "
                  "HeapSize: %.3f MiB; "
                  "HeapChange (abs): %+d (%d); ",
                  zoneStats.collectedZoneCount, zoneStats.zoneCount,
                  zoneStats.sweptZoneCount, zoneStats.collectedCompartmentCount,
                  zoneStats.compartmentCount, zoneStats.sweptCompartmentCount,
-                 double(preBytes) / bytesPerMiB,
+                 double(preHeapSize) / bytesPerMiB,
                  counts[COUNT_NEW_CHUNK] - counts[COUNT_DESTROY_CHUNK],
                  counts[COUNT_NEW_CHUNK] + counts[COUNT_DESTROY_CHUNK]);
   if (!fragments.append(DuplicateString(buffer))) {
     return UniqueChars(nullptr);
   }
 
   MOZ_ASSERT_IF(counts[COUNT_ARENA_RELOCATED], gckind == GC_SHRINK);
   if (gckind == GC_SHRINK) {
@@ -444,17 +444,17 @@ UniqueChars Statistics::formatDetailedDe
       buffer, format, ExplainInvocationKind(gckind),
       ExplainReason(slices_[0].reason), nonincremental() ? "no - " : "yes",
       nonincremental() ? ExplainAbortReason(nonincrementalReason_) : "",
       zoneStats.collectedZoneCount, zoneStats.zoneCount,
       zoneStats.sweptZoneCount, zoneStats.collectedCompartmentCount,
       zoneStats.compartmentCount, zoneStats.sweptCompartmentCount,
       getCount(COUNT_MINOR_GC), getCount(COUNT_STOREBUFFER_OVERFLOW),
       mmu20 * 100., mmu50 * 100., t(sccTotal), t(sccLongest),
-      double(preBytes) / bytesPerMiB,
+      double(preHeapSize) / bytesPerMiB,
       getCount(COUNT_NEW_CHUNK) - getCount(COUNT_DESTROY_CHUNK),
       getCount(COUNT_NEW_CHUNK) + getCount(COUNT_DESTROY_CHUNK),
       double(ArenaSize * getCount(COUNT_ARENA_RELOCATED)) / bytesPerMiB,
       thresholdBuffer);
 
   return DuplicateString(buffer);
 }
 
@@ -670,17 +670,17 @@ void Statistics::formatJsonDescription(u
   json.property("scc_sweep_total", sccTotal, JSONPrinter::MILLISECONDS);  // #14
   json.property("scc_sweep_max_pause", sccLongest,
                 JSONPrinter::MILLISECONDS);  // #15
 
   if (nonincrementalReason_ != AbortReason::None) {
     json.property("nonincremental_reason",
                   ExplainAbortReason(nonincrementalReason_));  // #16
   }
-  json.property("allocated_bytes", preBytes);  // #17
+  json.property("allocated_bytes", preHeapSize);  // #17
   uint32_t addedChunks = getCount(COUNT_NEW_CHUNK);
   if (addedChunks) {
     json.property("added_chunks", addedChunks);  // #18
   }
   uint32_t removedChunks = getCount(COUNT_DESTROY_CHUNK);
   if (removedChunks) {
     json.property("removed_chunks", removedChunks);  // #19
   }
@@ -736,17 +736,17 @@ void Statistics::formatJsonPhaseTimes(co
 }
 
 Statistics::Statistics(JSRuntime* rt)
     : runtime(rt),
       gcTimerFile(nullptr),
       gcDebugFile(nullptr),
       nonincrementalReason_(gc::AbortReason::None),
       allocsSinceMinorGC({0, 0}),
-      preBytes(0),
+      preHeapSize(0),
       thresholdTriggered(false),
       triggerAmount(0.0),
       triggerThreshold(0.0),
       startingMinorGCNumber(0),
       startingMajorGCNumber(0),
       startingSliceNumber(0),
       maxPauseInInterval(0),
       sliceCallback(nullptr),
@@ -965,17 +965,17 @@ void Statistics::printStats() {
 }
 
 void Statistics::beginGC(JSGCInvocationKind kind) {
   slices_.clearAndFree();
   sccTimes.clearAndFree();
   gckind = kind;
   nonincrementalReason_ = gc::AbortReason::None;
 
-  preBytes = runtime->gc.heapSize.gcBytes();
+  preHeapSize = runtime->gc.heapSize.gcBytes();
   startingMajorGCNumber = runtime->gc.majorGCCount();
   startingSliceNumber = runtime->gc.gcNumber();
 }
 
 void Statistics::endGC() {
   TimeDuration sccTotal, sccLongest;
   sccDurations(&sccTotal, &sccLongest);
 
--- a/js/src/gc/Statistics.h
+++ b/js/src/gc/Statistics.h
@@ -355,18 +355,18 @@ struct Statistics {
    * These events cannot be kept in the above array, we need to take their
    * address.
    */
   struct {
     uint32_t nursery;
     uint32_t tenured;
   } allocsSinceMinorGC;
 
-  /* Allocated space before the GC started. */
-  size_t preBytes;
+  /* Heap size before the GC started. */
+  size_t preHeapSize;
 
   /* If the GC was triggered by exceeding some threshold, record the
    * threshold and the value that exceeded it. */
   bool thresholdTriggered;
   double triggerAmount;
   double triggerThreshold;
 
   /* GC numbers as of the beginning of the collection. */