diff options
Diffstat (limited to 'js/src/gc/Nursery.h')
-rw-r--r-- | js/src/gc/Nursery.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/js/src/gc/Nursery.h b/js/src/gc/Nursery.h index 2bab1623b0..0d7b607ff8 100644 --- a/js/src/gc/Nursery.h +++ b/js/src/gc/Nursery.h @@ -328,9 +328,7 @@ class Nursery { } JS::GCReason minorGCTriggerReason() const { return minorGCTriggerReason_; } - bool shouldCollect() const; - bool isNearlyFull() const; - bool isUnderused() const; + bool wantEagerCollection() const; bool enableProfiling() const { return enableProfiling_; } @@ -383,12 +381,11 @@ class Nursery { KeyCount }; - using ProfileTimes = - mozilla::EnumeratedArray<ProfileKey, ProfileKey::KeyCount, - mozilla::TimeStamp>; + using ProfileTimes = mozilla::EnumeratedArray<ProfileKey, mozilla::TimeStamp, + size_t(ProfileKey::KeyCount)>; using ProfileDurations = - mozilla::EnumeratedArray<ProfileKey, ProfileKey::KeyCount, - mozilla::TimeDuration>; + mozilla::EnumeratedArray<ProfileKey, mozilla::TimeDuration, + size_t(ProfileKey::KeyCount)>; // Calculate the promotion rate of the most recent minor GC. // The valid_for_tenuring parameter is used to return whether this @@ -445,6 +442,9 @@ class Nursery { [[nodiscard]] bool moveToNextChunk(); + bool freeSpaceIsBelowEagerThreshold() const; + bool isUnderused() const; + struct CollectionResult { size_t tenuredBytes; size_t tenuredCells; |