☠☠ backed out by 17e8b5e9f8f9 ☠ ☠ | |
author | Jon Coppeard <jcoppeard@mozilla.com> |
Tue, 23 Jun 2020 08:31:28 +0000 | |
changeset 600840 | 32b62f886374909e479a29c345ff4b238da09192 |
parent 600839 | 0e900e18ead7ea87acc2cdc68ddb5e7b1054da6a |
child 600841 | 61916f49f2b3c38a26a8a48b597c7434e6b3cc59 |
push id | 13310 |
push user | ffxbld-merge |
push date | Mon, 29 Jun 2020 14:50:06 +0000 |
treeherder | mozilla-beta@15a59a0afa5c [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | sfink |
bugs | 1647319 |
milestone | 79.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/src/gc/GC.cpp +++ b/js/src/gc/GC.cpp @@ -4200,17 +4200,17 @@ bool GCRuntime::beginMarkPhase(JS::GCRea * not be part of the snapshot. If we purge after root marking, then * the mutator could obtain a pointer to the object and start using * it. This object might never be marked, so a GC hazard would exist. */ purgeRuntime(); if (IsShutdownGC(reason)) { /* Clear any engine roots that may hold external data live. */ - for (GCZonesIter zone(this, SkipAtoms); !zone.done(); zone.next()) { + for (GCZonesIter zone(this); !zone.done(); zone.next()) { zone->clearRootsForShutdownGC(); } } } /* * Mark phase. */ @@ -4310,17 +4310,17 @@ void GCRuntime::findDeadCompartments() { } } } void GCRuntime::updateMemoryCountersOnGCStart() { heapSize.updateOnGCStart(); // Update memory counters for the zones we are collecting. - for (GCZonesIter zone(this, WithAtoms); !zone.done(); zone.next()) { + for (GCZonesIter zone(this); !zone.done(); zone.next()) { zone->updateMemoryCountersOnGCStart(); } } template <class ZoneIterT> IncrementalProgress GCRuntime::markWeakReferences( SliceBudget& incrementalBudget) { gcstats::AutoPhase ap1(stats(), gcstats::PhaseKind::SWEEP_MARK_WEAK);
--- a/js/src/gc/PrivateIterators-inl.h +++ b/js/src/gc/PrivateIterators-inl.h @@ -42,31 +42,29 @@ class GrayObjectIter : public ZoneAllCel JSObject* get() const { return ZoneAllCellIter<js::gc::TenuredCell>::get<JSObject>(); } operator JSObject*() const { return get(); } JSObject* operator->() const { return get(); } }; class GCZonesIter { - ZonesIter zone; + AllZonesIter zone; public: - explicit GCZonesIter(GCRuntime* gc, ZoneSelector selector = WithAtoms) - : zone(gc, selector) { + explicit GCZonesIter(GCRuntime* gc) : zone(gc) { MOZ_ASSERT(JS::RuntimeHeapIsBusy()); MOZ_ASSERT_IF(gc->atomsZone->wasGCStarted(), !gc->rt->hasHelperThreadZones()); if (!done() && !zone->isCollectingFromAnyThread()) { next(); } } - explicit GCZonesIter(JSRuntime* rt, ZoneSelector selector = WithAtoms) - : GCZonesIter(&rt->gc, selector) {} + explicit GCZonesIter(JSRuntime* rt) : GCZonesIter(&rt->gc) {} bool done() const { return zone.done(); } void next() { MOZ_ASSERT(!done()); do { zone.next(); } while (!zone.done() && !zone->isCollectingFromAnyThread()); @@ -83,41 +81,30 @@ class GCZonesIter { using GCCompartmentsIter = CompartmentsOrRealmsIterT<GCZonesIter, CompartmentsInZoneIter>; using GCRealmsIter = CompartmentsOrRealmsIterT<GCZonesIter, RealmsInZoneIter>; /* Iterates over all zones in the current sweep group. */ class SweepGroupZonesIter { JS::Zone* current; - ZoneSelector selector; public: - explicit SweepGroupZonesIter(GCRuntime* gc, ZoneSelector selector = WithAtoms) - : selector(selector) { + explicit SweepGroupZonesIter(GCRuntime* gc) + : current(gc->getCurrentSweepGroup()) { MOZ_ASSERT(CurrentThreadIsPerformingGC()); - current = gc->getCurrentSweepGroup(); - maybeSkipAtomsZone(); } - explicit SweepGroupZonesIter(JSRuntime* rt, ZoneSelector selector = WithAtoms) - : SweepGroupZonesIter(&rt->gc, selector) {} - - void maybeSkipAtomsZone() { - if (selector == SkipAtoms && current && current->isAtomsZone()) { - current = current->nextNodeInGroup(); - MOZ_ASSERT_IF(current, !current->isAtomsZone()); - } - } + explicit SweepGroupZonesIter(JSRuntime* rt) + : SweepGroupZonesIter(&rt->gc) {} bool done() const { return !current; } void next() { MOZ_ASSERT(!done()); current = current->nextNodeInGroup(); - maybeSkipAtomsZone(); } JS::Zone* get() const { MOZ_ASSERT(!done()); return current; } operator JS::Zone*() const { return get(); }
--- a/js/src/gc/Statistics.cpp +++ b/js/src/gc/Statistics.cpp @@ -1036,17 +1036,17 @@ void Statistics::beginGC(JSGCInvocationK if (gc->lastGCEndTime()) { timeSinceLastGC = currentTime - gc->lastGCEndTime(); } } void Statistics::measureInitialHeapSize() { MOZ_ASSERT(preCollectedHeapBytes == 0); - for (GCZonesIter zone(gc, WithAtoms); !zone.done(); zone.next()) { + for (GCZonesIter zone(gc); !zone.done(); zone.next()) { preCollectedHeapBytes += zone->gcHeapSize.bytes(); } } void Statistics::adoptHeapSizeDuringIncrementalGC(Zone* mergedZone) { // A zone is being merged into a zone that's currently being collected so we // need to adjust our record of the total size of heap for collected zones. MOZ_ASSERT(gc->isIncrementalGCInProgress());