Bug 886911 - Don't cancel off-thread compilation for minor GCs. r=terrence

This commit is contained in:
Jan de Mooij 2013-06-26 20:35:32 +02:00
parent f7f5efd2e4
commit 5dc14b088a
4 changed files with 16 additions and 4 deletions

View File

@ -749,8 +749,15 @@ js::gc::MarkRuntime(JSTracer *trc, bool useSavedRoots)
ion::MarkJitActivations(rt, trc);
#endif
for (CompartmentsIter c(rt); !c.done(); c.next())
c->mark(trc);
if (!rt->isHeapMinorCollecting()) {
/*
* All JSCompartment::mark does is mark the globals for compartements
* which have been entered. Globals aren't nursery allocated so there's
* no need to do this for minor GCs.
*/
for (CompartmentsIter c(rt); !c.done(); c.next())
c->mark(trc);
}
/* The embedding can register additional roots here. */
if (JSTraceDataOp op = rt->gcBlackRootsTraceOp)

View File

@ -217,7 +217,7 @@ class StoreBuffer
return;
/* Check for overflow. */
if (top - pos < (unsigned)(sizeof(unsigned) + sizeof(T))) {
if (unsigned(top - pos) < unsigned(sizeof(unsigned) + sizeof(T))) {
owner->setOverflowed();
return;
}

View File

@ -376,7 +376,10 @@ IonRuntime::Mark(JSTracer *trc)
void
IonCompartment::mark(JSTracer *trc, JSCompartment *compartment)
{
// Cancel any active or pending off thread compilations.
// Cancel any active or pending off thread compilations. Note that the
// MIR graph does not hold any nursery pointers, so there's no need to
// do this for minor GCs.
JS_ASSERT(!trc->runtime->isHeapMinorCollecting());
CancelOffThreadIonCompile(compartment, NULL);
FinishAllOffThreadCompilations(this);

View File

@ -489,6 +489,8 @@ JSCompartment::markAllCrossCompartmentWrappers(JSTracer *trc)
void
JSCompartment::mark(JSTracer *trc)
{
JS_ASSERT(!trc->runtime->isHeapMinorCollecting());
#ifdef JS_ION
if (ionCompartment_)
ionCompartment_->mark(trc, this);