Bug 1513842 - Fix spelling mistake in GCRuntime::markUntilBudgetExhaused r=sfink
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 14 Dec 2018 10:57:30 +0000
changeset 450499 a7296c89eda9c77e07ca9523b12baeb54b30ea92
parent 450498 7c1c64c40df613928c0da1c9f265ef744f2e0002
child 450500 03a9dde1c3bcf6ff6205f8c3fad09e421fefd72f
push id110508
push userjcoppeard@mozilla.com
push dateFri, 14 Dec 2018 10:57:56 +0000
treeherdermozilla-inbound@a7296c89eda9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1513842
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 1513842 - Fix spelling mistake in GCRuntime::markUntilBudgetExhaused r=sfink
js/src/gc/Barrier.h
js/src/gc/GC.cpp
js/src/gc/GCMarker.h
js/src/gc/GCRuntime.h
js/src/gc/Marking.cpp
--- a/js/src/gc/Barrier.h
+++ b/js/src/gc/Barrier.h
@@ -45,19 +45,19 @@
  * To understand the pre-barrier, let's consider how incremental GC works. The
  * GC itself is divided into "slices". Between each slice, JS code is allowed to
  * run. Each slice should be short so that the user doesn't notice the
  * interruptions. In our GC, the structure of the slices is as follows:
  *
  * 1. ... JS work, which leads to a request to do GC ...
  * 2. [first GC slice, which performs all root marking and (maybe) more marking]
  * 3. ... more JS work is allowed to run ...
- * 4. [GC mark slice, which runs entirely in GCRuntime::markUntilBudgetExhaused]
+ * 4. [GC mark slice, which runs entirely in GCRuntime::markUntilBudgetExhausted]
  * 5. ... more JS work ...
- * 6. [GC mark slice, which runs entirely in GCRuntime::markUntilBudgetExhaused]
+ * 6. [GC mark slice, which runs entirely in GCRuntime::markUntilBudgetExhausted]
  * 7. ... more JS work ...
  * 8. [GC marking finishes; sweeping done non-incrementally; GC is done]
  * 9. ... JS continues uninterrupted now that GC is finishes ...
  *
  * Of course, there may be a different number of slices depending on how much
  * marking is to be done.
  *
  * The danger inherent in this scheme is that the JS code in steps 3, 5, and 7
--- a/js/src/gc/GC.cpp
+++ b/js/src/gc/GC.cpp
@@ -5800,30 +5800,30 @@ bool ArenaLists::foregroundFinalize(Free
 
   ArenaList finalized = sweepList.toArenaList();
   arenaLists(thingKind) =
       finalized.insertListWithCursorAtEnd(arenaLists(thingKind));
 
   return true;
 }
 
-IncrementalProgress GCRuntime::markUntilBudgetExhaused(
+IncrementalProgress GCRuntime::markUntilBudgetExhausted(
     SliceBudget& sliceBudget, gcstats::PhaseKind phase) {
   // Marked GC things may vary between recording and replaying, so marking
   // and sweeping should not perform any recorded events.
   mozilla::recordreplay::AutoDisallowThreadEvents disallow;
 
   /* Run a marking slice and return whether the stack is now empty. */
   gcstats::AutoPhase ap(stats(), phase);
-  return marker.markUntilBudgetExhaused(sliceBudget) ? Finished : NotFinished;
+  return marker.markUntilBudgetExhausted(sliceBudget) ? Finished : NotFinished;
 }
 
 void GCRuntime::drainMarkStack() {
   auto unlimited = SliceBudget::unlimited();
-  MOZ_RELEASE_ASSERT(marker.markUntilBudgetExhaused(unlimited));
+  MOZ_RELEASE_ASSERT(marker.markUntilBudgetExhausted(unlimited));
 }
 
 static void SweepThing(Shape* shape) {
   if (!shape->isMarkedAny()) {
     shape->sweep();
   }
 }
 
@@ -6477,17 +6477,17 @@ IncrementalProgress GCRuntime::performSw
   FreeOp fop(rt);
 
   // Drain the mark stack, except in the first sweep slice where we must not
   // yield to the mutator until we've starting sweeping a sweep group.
   MOZ_ASSERT(initialState <= State::Sweep);
   if (initialState != State::Sweep) {
     MOZ_ASSERT(marker.isDrained());
   } else {
-    if (markUntilBudgetExhaused(budget, gcstats::PhaseKind::SWEEP_MARK) ==
+    if (markUntilBudgetExhausted(budget, gcstats::PhaseKind::SWEEP_MARK) ==
         NotFinished) {
       return NotFinished;
     }
   }
 
   return sweepActions->run(this, &fop, budget);
 }
 
@@ -6952,17 +6952,17 @@ void GCRuntime::incrementalSlice(
         break;
       }
 
       MOZ_FALLTHROUGH;
 
     case State::Mark:
       AutoGCRooter::traceAllWrappers(rt->mainContextFromOwnThread(), &marker);
 
-      if (markUntilBudgetExhaused(budget, gcstats::PhaseKind::MARK) ==
+      if (markUntilBudgetExhausted(budget, gcstats::PhaseKind::MARK) ==
           NotFinished) {
         break;
       }
 
       MOZ_ASSERT(marker.isDrained());
 
       /*
        * There are a number of reasons why we break out of collection here,
--- a/js/src/gc/GCMarker.h
+++ b/js/src/gc/GCMarker.h
@@ -281,17 +281,17 @@ class GCMarker : public JSTracer {
   void delayMarkingArena(gc::Arena* arena);
   void delayMarkingChildren(const void* thing);
   void markDelayedChildren(gc::Arena* arena);
   MOZ_MUST_USE bool markDelayedChildren(SliceBudget& budget);
   bool hasDelayedChildren() const { return !!unmarkedArenaStackTop; }
 
   bool isDrained() { return isMarkStackEmpty() && !unmarkedArenaStackTop; }
 
-  MOZ_MUST_USE bool markUntilBudgetExhaused(SliceBudget& budget);
+  MOZ_MUST_USE bool markUntilBudgetExhausted(SliceBudget& budget);
 
   void setGCMode(JSGCMode mode) { stack.setGCMode(mode); }
 
   size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
 
 #ifdef DEBUG
   bool shouldCheckCompartments() { return strictCompartmentChecking; }
 #endif
--- a/js/src/gc/GCRuntime.h
+++ b/js/src/gc/GCRuntime.h
@@ -613,18 +613,18 @@ class GCRuntime {
                              JS::gcreason::Reason reason,
                              bool canAllocateMoreCode);
   void traceRuntimeForMajorGC(JSTracer* trc, AutoGCSession& session);
   void traceRuntimeAtoms(JSTracer* trc, const AutoAccessAtomsZone& atomsAccess);
   void traceKeptAtoms(JSTracer* trc);
   void traceRuntimeCommon(JSTracer* trc, TraceOrMarkRuntime traceOrMark);
   void maybeDoCycleCollection();
   void markCompartments();
-  IncrementalProgress markUntilBudgetExhaused(SliceBudget& sliceBudget,
-                                              gcstats::PhaseKind phase);
+  IncrementalProgress markUntilBudgetExhausted(SliceBudget& sliceBudget,
+                                               gcstats::PhaseKind phase);
   void drainMarkStack();
   template <class ZoneIterT>
   void markWeakReferences(gcstats::PhaseKind phase);
   void markWeakReferencesInCurrentGroup(gcstats::PhaseKind phase);
   template <class ZoneIterT>
   void markGrayReferences(gcstats::PhaseKind phase);
   void markBufferedGrayRoots(JS::Zone* zone);
   void markGrayReferencesInCurrentGroup(gcstats::PhaseKind phase);
--- a/js/src/gc/Marking.cpp
+++ b/js/src/gc/Marking.cpp
@@ -1566,17 +1566,17 @@ static void VisitTraceList(F f, const in
     f(reinterpret_cast<Value*>(memory + *traceList),
       std::forward<Args>(args)...);
     traceList++;
   }
 }
 
 /*** Mark-stack Marking *****************************************************/
 
-bool GCMarker::markUntilBudgetExhaused(SliceBudget& budget) {
+bool GCMarker::markUntilBudgetExhausted(SliceBudget& budget) {
 #ifdef DEBUG
   MOZ_ASSERT(!strictCompartmentChecking);
   strictCompartmentChecking = true;
   auto acc = mozilla::MakeScopeExit([&] { strictCompartmentChecking = false; });
 #endif
 
   if (budget.isOverBudget()) {
     return false;