Backout 483210d830f0 (bug 984537) for memory regressions.
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 05 May 2014 14:28:06 -0400
changeset 199067 a7676d7a44ac8bbc804b26185b225a33ddcd1fea
parent 199066 37f76b785915828544d54a966c88851718b8b7c9
child 199068 0e571cde7fecfdbf7c77795fd0ee104723ce8cad
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs984537
milestone31.0a2
backs out483210d830f00f73825a4e6e2916999ff83805e5
Backout 483210d830f0 (bug 984537) for memory regressions.
js/src/jit/IonFrames.cpp
js/src/jit/IonFrames.h
js/src/jsgc.cpp
--- a/js/src/jit/IonFrames.cpp
+++ b/js/src/jit/IonFrames.cpp
@@ -1216,24 +1216,16 @@ MarkJitActivation(JSTracer *trc, const J
 
 void
 MarkJitActivations(JSRuntime *rt, JSTracer *trc)
 {
     for (JitActivationIterator activations(rt); !activations.done(); ++activations)
         MarkJitActivation(trc, activations);
 }
 
-JSCompartment *
-TopmostJitActivationCompartment(JSRuntime *rt)
-{
-    for (JitActivationIterator activations(rt); !activations.done(); ++activations)
-        return activations.activation()->compartment();
-    return nullptr;
-}
-
 #ifdef JSGC_GENERATIONAL
 void
 UpdateJitActivationsForMinorGC(JSRuntime *rt, JSTracer *trc)
 {
     JS_ASSERT(trc->runtime()->isHeapMinorCollecting());
     for (JitActivationIterator activations(rt); !activations.done(); ++activations) {
         for (JitFrameIterator frames(activations); !frames.done(); ++frames) {
             if (frames.type() == JitFrame_IonJS)
--- a/js/src/jit/IonFrames.h
+++ b/js/src/jit/IonFrames.h
@@ -263,19 +263,16 @@ struct ResumeFromException
 void HandleException(ResumeFromException *rfe);
 void HandleParallelFailure(ResumeFromException *rfe);
 
 void EnsureExitFrame(IonCommonFrameLayout *frame);
 
 void MarkJitActivations(JSRuntime *rt, JSTracer *trc);
 void MarkIonCompilerRoots(JSTracer *trc);
 
-JSCompartment *
-TopmostJitActivationCompartment(JSRuntime *rt);
-
 #ifdef JSGC_GENERATIONAL
 void UpdateJitActivationsForMinorGC(JSRuntime *rt, JSTracer *trc);
 #endif
 
 static inline uint32_t
 MakeFrameDescriptor(uint32_t frameSize, FrameType type)
 {
     return (frameSize << FRAMESIZE_SHIFT) | type;
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -2765,23 +2765,16 @@ BeginMarkPhase(JSRuntime *rt)
 
     for (CompartmentsIter c(rt, WithAtoms); !c.done(); c.next()) {
         JS_ASSERT(c->gcLiveArrayBuffers.empty());
         c->marked = false;
         if (ShouldPreserveJITCode(c, currentTime))
             c->zone()->setPreservingCode(true);
     }
 
-    if (!rt->gcShouldCleanUpEverything) {
-#ifdef JS_ION
-        if (JSCompartment *comp = jit::TopmostJitActivationCompartment(rt))
-            comp->zone()->setPreservingCode(true);
-#endif
-    }
-
     /*
      * Atoms are not in the cross-compartment map. So if there are any
      * zones that are not being collected, we are not allowed to collect
      * atoms. Otherwise, the non-collected zones could contain pointers
      * to atoms that we would miss.
      *
      * keepAtoms() will only change on the main thread, which we are currently
      * on. If the value of keepAtoms() changes between GC slices, then we'll