summaryrefslogtreecommitdiffstats
path: root/js/src/gc/Nursery.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /js/src/gc/Nursery.h
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/gc/Nursery.h')
-rw-r--r--js/src/gc/Nursery.h16
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;