зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1360526 - Move more miscellaneous sweeping off the main thread r=sfink
--HG-- extra : rebase_source : 32ce6f137eebe07740f9e855d452a83b3d7a922c
This commit is contained in:
Родитель
f9b398f422
Коммит
fc496d2511
|
@ -911,6 +911,13 @@ JSCompartment::sweepVarNames()
|
|||
varNames_.sweep();
|
||||
}
|
||||
|
||||
void
|
||||
JSCompartment::sweepWatchpoints()
|
||||
{
|
||||
if (watchpointMap)
|
||||
watchpointMap->sweep();
|
||||
}
|
||||
|
||||
namespace {
|
||||
struct TraceRootFunctor {
|
||||
JSTracer* trc;
|
||||
|
|
|
@ -716,6 +716,7 @@ struct JSCompartment
|
|||
void sweepNativeIterators();
|
||||
void sweepTemplateObjects();
|
||||
void sweepVarNames();
|
||||
void sweepWatchpoints();
|
||||
|
||||
void purge();
|
||||
void clearTables();
|
||||
|
|
|
@ -5019,10 +5019,14 @@ SweepRegExpsTask::run()
|
|||
SweepMiscTask::run()
|
||||
{
|
||||
for (GCCompartmentGroupIter c(runtime()); !c.done(); c.next()) {
|
||||
c->sweepGlobalObject();
|
||||
c->sweepDebugEnvironments();
|
||||
c->sweepTemplateObjects();
|
||||
c->sweepSavedStacks();
|
||||
c->sweepTemplateLiteralMap();
|
||||
c->sweepSelfHostingScriptSource();
|
||||
c->sweepNativeIterators();
|
||||
c->sweepWatchpoints();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5202,23 +5206,16 @@ GCRuntime::beginSweepingSweepGroup(AutoLockForExclusiveAccess& lock)
|
|||
// Cancel any active or pending off thread compilations.
|
||||
js::CancelOffThreadIonCompile(rt, JS::Zone::Sweep);
|
||||
|
||||
for (GCCompartmentGroupIter c(rt); !c.done(); c.next()) {
|
||||
c->sweepGlobalObject();
|
||||
c->sweepDebugEnvironments();
|
||||
for (GCCompartmentGroupIter c(rt); !c.done(); c.next())
|
||||
c->sweepJitCompartment(&fop);
|
||||
c->sweepTemplateObjects();
|
||||
}
|
||||
|
||||
for (GCSweepGroupIter zone(rt); !zone.done(); zone.next()) {
|
||||
if (jit::JitZone* jitZone = zone->jitZone())
|
||||
jitZone->sweep(&fop);
|
||||
}
|
||||
|
||||
// Bug 1071218: the following two methods have not yet been
|
||||
// refactored to work on a single zone-group at once.
|
||||
|
||||
// Collect watch points associated with unreachable objects.
|
||||
WatchpointMap::sweepAll(rt);
|
||||
// Bug 1071218: the following method has not yet been refactored to
|
||||
// work on a single zone-group at once.
|
||||
|
||||
// Sweep entries containing about-to-be-finalized JitCode and
|
||||
// update relocated TypeSet::Types inside the JitcodeGlobalTable.
|
||||
|
|
|
@ -193,6 +193,9 @@ WatchpointMap::trace(JSTracer* trc)
|
|||
/* static */ void
|
||||
WatchpointMap::sweepAll(JSRuntime* rt)
|
||||
{
|
||||
// This is called during compacting GC. Watchpoint closure pointers can be
|
||||
// cross-compartment so we have to sweep all watchpoint maps, not just those
|
||||
// owned by compartments we are compacting.
|
||||
for (GCCompartmentsIter c(rt); !c.done(); c.next()) {
|
||||
if (WatchpointMap* wpmap = c->watchpointMap)
|
||||
wpmap->sweep();
|
||||
|
|
Загрузка…
Ссылка в новой задаче