Bug 1144369 - Add a GC phase to track time spent buffering gray roots; r=sfink, a=RyanVM

This commit is contained in:
Terrence Cole 2015-03-18 10:49:02 -07:00
parent 0d22d97eb5
commit bae886e9cf
3 changed files with 5 additions and 1 deletions

View File

@ -374,6 +374,7 @@ static const PhaseInfo phases[] = {
{ PHASE_TRACE_HEAP, "Trace Heap", PHASE_NO_PARENT },
/* PHASE_MARK_ROOTS */
{ PHASE_MARK_ROOTS, "Mark Roots", PHASE_MULTI_PARENTS },
{ PHASE_BUFFER_GRAY_ROOTS, "Buffer Gray Roots", PHASE_MARK_ROOTS },
{ PHASE_MARK_CCWS, "Mark Cross Compartment Wrappers", PHASE_MARK_ROOTS },
{ PHASE_MARK_ROOTERS, "Mark Rooters", PHASE_MARK_ROOTS },
{ PHASE_MARK_RUNTIME_DATA, "Mark Runtime-wide Data", PHASE_MARK_ROOTS },

View File

@ -75,6 +75,7 @@ enum Phase {
PHASE_EVICT_NURSERY,
PHASE_TRACE_HEAP,
PHASE_MARK_ROOTS,
PHASE_BUFFER_GRAY_ROOTS,
PHASE_MARK_CCWS,
PHASE_MARK_ROOTERS,
PHASE_MARK_RUNTIME_DATA,

View File

@ -3830,8 +3830,10 @@ GCRuntime::beginMarkPhase(JS::gcreason::Reason reason)
gcstats::AutoPhase ap2(stats, gcstats::PHASE_MARK_ROOTS);
if (isIncremental)
if (isIncremental) {
gcstats::AutoPhase ap3(stats, gcstats::PHASE_BUFFER_GRAY_ROOTS);
bufferGrayRoots();
}
/*
* This code ensures that if a compartment is "dead", then it will be