Bug 1220703 - Remove AutoDisableStoreBuffer; r=jonco
authorTerrence Cole <terrence@mozilla.com>
Wed, 04 Nov 2015 07:07:01 -0800
changeset 271138 835785b85db2f1c1392c4448f5a64082483dbfa4
parent 271137 f7cb9a24f1ecd435b9925ce26927715607828a4c
child 271139 f1dd50e3451f4ca8d51479535c1d6c9a355f4f4d
push id67560
push usertcole@mozilla.com
push dateWed, 04 Nov 2015 15:08:11 +0000
treeherdermozilla-inbound@835785b85db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1220703
milestone45.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 1220703 - Remove AutoDisableStoreBuffer; r=jonco
js/src/jsgc.cpp
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -6165,32 +6165,16 @@ GCRuntime::budgetIncrementalGC(SliceBudg
     }
 
     if (reset)
         resetIncrementalGC("zone change");
 }
 
 namespace {
 
-class AutoDisableStoreBuffer
-{
-    StoreBuffer& sb;
-    bool prior;
-
-  public:
-    explicit AutoDisableStoreBuffer(GCRuntime* gc) : sb(gc->storeBuffer) {
-        prior = sb.isEnabled();
-        sb.disable();
-    }
-    ~AutoDisableStoreBuffer() {
-        if (prior)
-            sb.enable();
-    }
-};
-
 class AutoScheduleZonesForGC
 {
     JSRuntime* rt_;
 
   public:
     explicit AutoScheduleZonesForGC(JSRuntime* rt) : rt_(rt) {
         for (ZonesIter zone(rt_, WithAtoms); !zone.done(); zone.next()) {
             if (rt->gc.gcMode() == JSGC_MODE_GLOBAL)
@@ -6232,22 +6216,16 @@ GCRuntime::gcCycle(bool nonincrementalBy
     AutoTraceLog logGC(TraceLoggerForMainThread(rt), TraceLogger_GC);
     AutoStopVerifyingBarriers av(rt, IsShutdownGC(reason));
     AutoScheduleZonesForGC asz(rt);
     gcstats::AutoGCSlice agc(stats, scanZonesBeforeGC(), invocationKind, budget, reason);
     AutoNotifyGCActivity notify(*this);
 
     evictNursery(reason);
 
-    /*
-     * Marking can trigger many incidental post barriers, some of them for
-     * objects which are not going to be live after the GC.
-     */
-    AutoDisableStoreBuffer adsb(this);
-
     AutoTraceSession session(rt, JS::HeapState::MajorCollecting);
 
     majorGCTriggerReason = JS::gcreason::NO_REASON;
     interFrameGC = true;
 
     number++;
     if (!isIncrementalGCInProgress())
         incMajorGcNumber();
@@ -6506,17 +6484,16 @@ GCRuntime::abortGC()
     MOZ_ASSERT(!rt->mainThread.suppressGC);
 
     AutoStopVerifyingBarriers av(rt, false);
 
     gcstats::AutoGCSlice agc(stats, scanZonesBeforeGC(), invocationKind,
                              SliceBudget::unlimited(), JS::gcreason::ABORT_GC);
 
     evictNursery(JS::gcreason::ABORT_GC);
-    AutoDisableStoreBuffer adsb(this);
     AutoTraceSession session(rt, JS::HeapState::MajorCollecting);
 
     number++;
     resetIncrementalGC("abort");
 }
 
 void
 GCRuntime::notifyDidPaint()