Bug 1360526 - Refactor queing arenas for sweeping to use a single loop r=sfink

--HG--
extra : rebase_source : 0dc02838c0ad9e365b3975ce1642a3da390fe21f
This commit is contained in:
Jon Coppeard 2017-05-03 11:26:02 +01:00
Родитель 65e6107a3b
Коммит 00d998b339
1 изменённых файлов: 5 добавлений и 12 удалений

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

@ -5266,26 +5266,19 @@ GCRuntime::beginSweepingSweepGroup(AutoLockForExclusiveAccess& lock)
joinTask(task, gcstats::PHASE_SWEEP_MISC, helperLock);
}
/*
* Queue all GC things in all zones for sweeping, either in the
* foreground or on the background thread.
*
* Note that order is important here for the background case.
*/
// Queue all GC things in all zones for sweeping, either on the foreground
// or on the background thread.
for (GCSweepGroupIter zone(rt); !zone.done(); zone.next()) {
gcstats::AutoSCC scc(stats(), sweepGroupIndex);
zone->arenas.queueForForegroundSweep(&fop, ForegroundObjectFinalizePhase);
for (unsigned i = 0; i < ArrayLength(IncrementalFinalizePhases); ++i)
zone->arenas.queueForForegroundSweep(&fop, IncrementalFinalizePhases[i]);
}
for (GCSweepGroupIter zone(rt); !zone.done(); zone.next()) {
gcstats::AutoSCC scc(stats(), sweepGroupIndex);
for (unsigned i = 0; i < ArrayLength(BackgroundFinalizePhases); ++i)
zone->arenas.queueForBackgroundSweep(&fop, BackgroundFinalizePhases[i]);
}
for (GCSweepGroupIter zone(rt); !zone.done(); zone.next()) {
gcstats::AutoSCC scc(stats(), sweepGroupIndex);
zone->arenas.queueForegroundThingsForSweep(&fop);
}