Bug 1290584 - Lift stack marking into a function; r=jonco

--HG--
extra : rebase_source : 34b86b3e70ee005161e84aeced5a46778e75fb83
This commit is contained in:
Terrence Cole 2016-07-29 14:11:33 -07:00
Родитель 8ea092d9c1
Коммит 5eff732587
3 изменённых файлов: 16 добавлений и 12 удалений

Просмотреть файл

@ -325,23 +325,31 @@ js::gc::GCRuntime::traceRuntimeCommon(JSTracer* trc, TraceOrMarkRuntime traceOrM
{
MOZ_ASSERT(!rt->mainThread.suppressGC);
// Trace C stack roots.
{
gcstats::AutoPhase ap(stats, gcstats::PHASE_MARK_ROOTERS);
gcstats::AutoPhase ap(stats, gcstats::PHASE_MARK_STACK);
// Trace active interpreter and JIT stack roots.
MarkInterpreterActivations(rt, trc);
jit::MarkJitActivations(rt, trc);
// Trace legacy C stack roots.
AutoGCRooter::traceAll(trc);
MarkExactStackRoots(rt, trc);
rt->markSelfHostingGlobal(trc);
for (RootRange r = rootsHash.all(); !r.empty(); r.popFront()) {
const RootEntry& entry = r.front();
TraceRoot(trc, entry.key(), entry.value());
}
MarkPersistentRooted(rt, trc);
// Trace C stack roots.
MarkExactStackRoots(rt, trc);
}
// Trace runtime global roots.
MarkPersistentRooted(rt, trc);
// Trace the self-hosting global compartment.
rt->markSelfHostingGlobal(trc);
// Trace the atoms Compartment.
if (!rt->isHeapMinorCollecting()) {
gcstats::AutoPhase ap(stats, gcstats::PHASE_MARK_RUNTIME_DATA);
@ -367,10 +375,6 @@ js::gc::GCRuntime::traceRuntimeCommon(JSTracer* trc, TraceOrMarkRuntime traceOrM
for (CompartmentsIter c(rt, SkipAtoms); !c.done(); c.next())
c->traceRoots(trc, traceOrMark);
// Trace JS stack roots.
MarkInterpreterActivations(rt, trc);
jit::MarkJitActivations(rt, trc);
// Trace SPS.
rt->spsProfiler.trace(trc);

Просмотреть файл

@ -180,7 +180,7 @@ static const PhaseInfo phases[] = {
{ PHASE_MARK_ROOTS, "Mark Roots", PHASE_MULTI_PARENTS, 48 },
{ PHASE_BUFFER_GRAY_ROOTS, "Buffer Gray Roots", PHASE_MARK_ROOTS, 49 },
{ PHASE_MARK_CCWS, "Mark Cross Compartment Wrappers", PHASE_MARK_ROOTS, 50 },
{ PHASE_MARK_ROOTERS, "Mark Rooters", PHASE_MARK_ROOTS, 51 },
{ PHASE_MARK_STACK, "Mark C and JS stacks", PHASE_MARK_ROOTS, 51 },
{ PHASE_MARK_RUNTIME_DATA, "Mark Runtime-wide Data", PHASE_MARK_ROOTS, 52 },
{ PHASE_MARK_EMBEDDING, "Mark Embedding", PHASE_MARK_ROOTS, 53 },
{ PHASE_MARK_COMPARTMENTS, "Mark Compartments", PHASE_MARK_ROOTS, 54 },

Просмотреть файл

@ -81,7 +81,7 @@ enum Phase : uint8_t {
PHASE_MARK_ROOTS,
PHASE_BUFFER_GRAY_ROOTS,
PHASE_MARK_CCWS,
PHASE_MARK_ROOTERS,
PHASE_MARK_STACK,
PHASE_MARK_RUNTIME_DATA,
PHASE_MARK_EMBEDDING,
PHASE_MARK_COMPARTMENTS,