зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1358135 part 2 - Preserve a Zone's JIT code also when it has Baseline code on the stack. r=bhackett
This commit is contained in:
Родитель
d2c775856a
Коммит
53b79d09c3
|
@ -13,7 +13,7 @@ function test() {
|
|||
while(!callInIon());
|
||||
|
||||
// Test with zealous gc preventing compilation.
|
||||
while(!inIon()) gc();
|
||||
while(!inIon()) gc(this, 'shrinking');
|
||||
};
|
||||
|
||||
test();
|
||||
|
|
|
@ -1532,19 +1532,8 @@ TraceJitActivations(JSContext* cx, const CooperatingContext& target, JSTracer* t
|
|||
TraceJitActivation(trc, activations);
|
||||
}
|
||||
|
||||
JSCompartment*
|
||||
TopmostIonActivationCompartment(JSContext* cx)
|
||||
{
|
||||
for (JitActivationIterator activations(cx); !activations.done(); ++activations) {
|
||||
for (JitFrameIterator frames(activations); !frames.done(); ++frames) {
|
||||
if (frames.type() == JitFrame_IonJS)
|
||||
return activations.activation()->compartment();
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void UpdateJitActivationsForMinorGC(JSRuntime* rt, JSTracer* trc)
|
||||
void
|
||||
UpdateJitActivationsForMinorGC(JSRuntime* rt, JSTracer* trc)
|
||||
{
|
||||
MOZ_ASSERT(JS::CurrentThreadIsHeapMinorCollecting());
|
||||
JSContext* cx = TlsContext.get();
|
||||
|
|
|
@ -287,9 +287,6 @@ void EnsureBareExitFrame(JSContext* cx, JitFrameLayout* frame);
|
|||
|
||||
void TraceJitActivations(JSContext* cx, const CooperatingContext& target, JSTracer* trc);
|
||||
|
||||
JSCompartment*
|
||||
TopmostIonActivationCompartment(JSContext* cx);
|
||||
|
||||
void UpdateJitActivationsForMinorGC(JSRuntime* rt, JSTracer* trc);
|
||||
|
||||
static inline uint32_t
|
||||
|
|
|
@ -3850,8 +3850,9 @@ GCRuntime::beginMarkPhase(JS::gcreason::Reason reason, AutoLockForExclusiveAcces
|
|||
}
|
||||
|
||||
if (!rt->gc.cleanUpEverything && canAllocateMoreCode) {
|
||||
if (JSCompartment* comp = jit::TopmostIonActivationCompartment(TlsContext.get()))
|
||||
comp->zone()->setPreservingCode(true);
|
||||
jit::JitActivationIterator activation(TlsContext.get());
|
||||
if (!activation.done())
|
||||
activation->compartment()->zone()->setPreservingCode(true);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче