Bug 1502105 - Rename GCRuntime::incrementalCollectSlice to incrementalSlice r=sfink
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 26 Oct 2018 11:03:44 +0100
changeset 443100 291713ea57916b33e3142c5d86950c8430850678
parent 443099 3239cb300fdbe414ad485e76e76707f9c1b875d8
child 443101 9202539b100245516a3bf0e69fefc37e0ca78e0a
push id109296
push userjcoppeard@mozilla.com
push dateFri, 26 Oct 2018 10:06:11 +0000
treeherdermozilla-inbound@cf78ed26a337 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1502105
milestone65.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 1502105 - Rename GCRuntime::incrementalCollectSlice to incrementalSlice r=sfink
js/src/gc/GC.cpp
js/src/gc/GCRuntime.h
--- a/js/src/gc/GC.cpp
+++ b/js/src/gc/GC.cpp
@@ -7290,17 +7290,17 @@ GCRuntime::resetIncrementalGC(gc::AbortR
         /* Finish sweeping the current sweep group, then abort. */
         abortSweepAfterCurrentGroup = true;
 
         /* Don't perform any compaction after sweeping. */
         bool wasCompacting = isCompacting;
         isCompacting = false;
 
         auto unlimited = SliceBudget::unlimited();
-        incrementalCollectSlice(unlimited, JS::gcreason::RESET, session);
+        incrementalSlice(unlimited, JS::gcreason::RESET, session);
 
         isCompacting = wasCompacting;
 
         {
             gcstats::AutoPhase ap(stats(), gcstats::PhaseKind::WAIT_BACKGROUND_THREAD);
             waitBackgroundSweepOrAllocEnd();
         }
         break;
@@ -7311,40 +7311,40 @@ GCRuntime::resetIncrementalGC(gc::AbortR
             gcstats::AutoPhase ap(stats(), gcstats::PhaseKind::WAIT_BACKGROUND_THREAD);
             waitBackgroundSweepOrAllocEnd();
         }
 
         bool wasCompacting = isCompacting;
         isCompacting = false;
 
         auto unlimited = SliceBudget::unlimited();
-        incrementalCollectSlice(unlimited, JS::gcreason::RESET, session);
+        incrementalSlice(unlimited, JS::gcreason::RESET, session);
 
         isCompacting = wasCompacting;
 
         break;
       }
 
       case State::Compact: {
         bool wasCompacting = isCompacting;
 
         isCompacting = true;
         startedCompacting = true;
         zonesToMaybeCompact.ref().clear();
 
         auto unlimited = SliceBudget::unlimited();
-        incrementalCollectSlice(unlimited, JS::gcreason::RESET, session);
+        incrementalSlice(unlimited, JS::gcreason::RESET, session);
 
         isCompacting = wasCompacting;
         break;
       }
 
       case State::Decommit: {
         auto unlimited = SliceBudget::unlimited();
-        incrementalCollectSlice(unlimited, JS::gcreason::RESET, session);
+        incrementalSlice(unlimited, JS::gcreason::RESET, session);
         break;
       }
     }
 
     stats().reset(reason);
 
 #ifdef DEBUG
     assertBackgroundSweepingFinished();
@@ -7428,17 +7428,17 @@ ShouldCleanUpEverything(JS::gcreason::Re
 {
     // During shutdown, we must clean everything up, for the sake of leak
     // detection. When a runtime has no contexts, or we're doing a GC before a
     // shutdown CC, those are strong indications that we're shutting down.
     return IsShutdownGC(reason) || gckind == GC_SHRINK;
 }
 
 GCRuntime::IncrementalResult
-GCRuntime::incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason reason,
+GCRuntime::incrementalSlice(SliceBudget& budget, JS::gcreason::Reason reason,
                                    AutoGCSession& session)
 {
     AutoDisableBarriers disableBarriers(rt);
 
     bool destroyingRuntime = (reason == JS::gcreason::DESTROY_RUNTIME);
 
     initialState = incrementalState;
 
@@ -7936,17 +7936,17 @@ GCRuntime::gcCycle(bool nonincrementalBy
     // If an ongoing incremental GC was reset, we may need to restart.
     if (result == IncrementalResult::ResetIncremental) {
         MOZ_ASSERT(!isIncrementalGCInProgress());
         return result;
     }
 
     gcTracer.traceMajorGCStart();
 
-    result = incrementalCollectSlice(budget, reason, session);
+    result = incrementalSlice(budget, reason, session);
 
     chunkAllocationSinceLastGC = false;
 
 #ifdef JS_GC_ZEAL
     /* Keeping these around after a GC is dangerous. */
     clearSelectedForMarking();
 #endif
 
@@ -8733,17 +8733,17 @@ GCRuntime::runDebugGC()
         /* Reset the slice size when we get to the sweep or compact phases. */
         if ((initialState == State::Mark && incrementalState == State::Sweep) ||
             (initialState == State::Sweep && incrementalState == State::Compact))
         {
             incrementalLimit = zealFrequency / 2;
         }
     } else if (hasIncrementalTwoSliceZealMode()) {
         // These modes trigger incremental GC that happens in two slices and the
-        // supplied budget is ignored by incrementalCollectSlice.
+        // supplied budget is ignored by incrementalSlice.
         budget = SliceBudget(WorkBudget(1));
 
         if (!isIncrementalGCInProgress()) {
             invocationKind = GC_NORMAL;
         }
         collect(false, budget, JS::gcreason::DEBUG_GC);
     } else if (hasZealMode(ZealMode::Compact)) {
         gc(GC_SHRINK, JS::gcreason::DEBUG_GC);
--- a/js/src/gc/GCRuntime.h
+++ b/js/src/gc/GCRuntime.h
@@ -588,19 +588,19 @@ class GCRuntime
      *  * ReturnToEvictNursery if the collector needs the nursery to be
      *    evicted before it can continue or
      *  * Ok otherwise.
      */
     MOZ_MUST_USE IncrementalResult gcCycle(bool nonincrementalByAPI,
                                            SliceBudget& budget,
                                            JS::gcreason::Reason reason);
     bool shouldRepeatForDeadZone(JS::gcreason::Reason reason);
-    IncrementalResult incrementalCollectSlice(SliceBudget& budget,
-                                              JS::gcreason::Reason reason,
-                                              AutoGCSession& session);
+    IncrementalResult incrementalSlice(SliceBudget& budget,
+                                       JS::gcreason::Reason reason,
+                                       AutoGCSession& session);
     MOZ_MUST_USE bool shouldCollectNurseryForSlice(bool nonincrementalByAPI,
         SliceBudget& budget);
 
     friend class AutoCallGCCallbacks;
     void maybeCallGCCallback(JSGCStatus status);
 
     void pushZealSelectedObjects();
     void purgeRuntime();