Bug 1555558 - Don't collect the nursery for finalise or decommit slices r=sfink
authorPaul Bone <pbone@mozilla.com>
Fri, 31 May 2019 06:05:19 +0000
changeset 476355 1bd9072aad08f61e9e239b45792b5494407b1b1c
parent 476354 80554fedd3aa7fb1d52dc1c83abb226e0c6046fe
child 476356 f5a8d8e97356dcbaa021a4d82f06239af1edd538
push id36092
push userarchaeopteryx@coole-files.de
push dateFri, 31 May 2019 17:03:46 +0000
treeherdermozilla-central@8384972e1f6a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1555558
milestone69.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 1555558 - Don't collect the nursery for finalise or decommit slices r=sfink Differential Revision: https://phabricator.services.mozilla.com/D33137
js/src/gc/GC.cpp
--- a/js/src/gc/GC.cpp
+++ b/js/src/gc/GC.cpp
@@ -7277,21 +7277,19 @@ void GCRuntime::incrementalSlice(SliceBu
       // Always yield before compacting since it is not incremental.
       if (isCompacting && !budget.isUnlimited()) {
         break;
       }
 
       MOZ_FALLTHROUGH;
 
     case State::Compact:
-      MOZ_ASSERT(nursery().isEmpty());
-      storeBuffer().checkEmpty();
-
       if (isCompacting) {
         MOZ_ASSERT(nursery().isEmpty());
+        storeBuffer().checkEmpty();
         if (!startedCompacting) {
           beginCompactPhase();
         }
 
         if (compactPhase(reason, budget, session) == NotFinished) {
           break;
         }
 
@@ -7625,21 +7623,21 @@ bool GCRuntime::shouldCollectNurseryForS
                                              SliceBudget& budget) {
   if (!nursery().isEnabled()) {
     return false;
   }
 
   switch (incrementalState) {
     case State::NotActive:
     case State::Sweep:
-    case State::Finalize:
     case State::Compact:
-    case State::Decommit:
       return true;
     case State::Mark:
+    case State::Finalize:
+    case State::Decommit:
       return (nonincrementalByAPI || budget.isUnlimited() || lastMarkSlice ||
               nursery().shouldCollect() || hasIncrementalTwoSliceZealMode());
     case State::Finish:
       return false;
     case State::MarkRoots:
       MOZ_CRASH("Unexpected GC state");
   }