Skip to content

Commit

Permalink
Bug 538450 - Part 6: Remove GCRuntime::triggerFullGCForAtoms. r=jonco
Browse files Browse the repository at this point in the history
  • Loading branch information
arai-a committed Nov 19, 2021
1 parent 12ea83d commit e9ea4e3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
1 change: 0 additions & 1 deletion js/public/GCAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,6 @@ namespace JS {
D(RESET, 9) \
D(OUT_OF_NURSERY, 10) \
D(EVICT_NURSERY, 11) \
D(DELAYED_ATOMS_GC, 12) \
D(SHARED_MEMORY_LIMIT, 13) \
D(IDLE_TIME_COLLECTION, 14) \
D(BG_TASK_FINISHED, 15) \
Expand Down
16 changes: 0 additions & 16 deletions js/src/gc/GC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ GCRuntime::GCRuntime(JSRuntime* rt)
cleanUpEverything(false),
grayBitsValid(false),
majorGCTriggerReason(JS::GCReason::NO_REASON),
fullGCForAtomsRequested_(false),
minorGCNumber(0),
majorGCNumber(0),
number(0),
Expand Down Expand Up @@ -1632,14 +1631,6 @@ bool GCRuntime::checkEagerAllocTrigger(const HeapSize& size,
return true;
}

void GCRuntime::triggerFullGCForAtoms(JSContext* cx) {
MOZ_ASSERT(fullGCForAtomsRequested_);
MOZ_ASSERT(CurrentThreadCanAccessRuntime(rt));
MOZ_ASSERT(!JS::RuntimeHeapIsCollecting());
fullGCForAtomsRequested_ = false;
MOZ_RELEASE_ASSERT(triggerGC(JS::GCReason::DELAYED_ATOMS_GC));
}

void GCRuntime::startDecommit() {
gcstats::AutoPhase ap(stats(), gcstats::PhaseKind::DECOMMIT);

Expand Down Expand Up @@ -2200,13 +2191,6 @@ bool GCRuntime::prepareZonesForCollection(JS::GCReason reason,
zone->setWasCollected(shouldCollect);
}

/*
* Check that we do collect the atoms zone if we triggered a GC for that
* purpose.
*/
MOZ_ASSERT_IF(reason == JS::GCReason::DELAYED_ATOMS_GC,
atomsZone->isGCPreparing());

/* Check that at least one zone is scheduled for collection. */
return any;
}
Expand Down
7 changes: 0 additions & 7 deletions js/src/gc/GCRuntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,6 @@ class GCRuntime {
void startDebugGC(JS::GCOptions options, SliceBudget& budget);
void debugGCSlice(SliceBudget& budget);

void triggerFullGCForAtoms(JSContext* cx);

void runDebugGC();
void notifyRootsRemoved();

Expand Down Expand Up @@ -521,8 +519,6 @@ class GCRuntime {
return majorGCTriggerReason != JS::GCReason::NO_REASON;
}

bool fullGCForAtomsRequested() const { return fullGCForAtomsRequested_; }

double computeHeapGrowthFactor(size_t lastBytes);
size_t computeTriggerBytes(double growthFactor, size_t lastBytes);

Expand Down Expand Up @@ -999,9 +995,6 @@ class GCRuntime {
mozilla::Atomic<JS::GCReason, mozilla::ReleaseAcquire> majorGCTriggerReason;

private:
/* Perform full GC when we are able to collect the atoms zone. */
MainThreadData<bool> fullGCForAtomsRequested_;

/* Incremented at the start of every minor GC. */
MainThreadData<uint64_t> minorGCNumber;

Expand Down

0 comments on commit e9ea4e3

Please sign in to comment.