Skip to content

Commit 5fa62dd

Browse files
manoskoukV8 LUCI CQ
authored andcommitted
Revert "[heap] Do not recompute limits in NotifyLoadingEnded"
This reverts commit f0ecc67. Reason for revert: Blocks V8 roll into chromium. E.g. https://chromium-review.googlesource.com/c/chromium/src/+/7414660 Original change's description: > [heap] Do not recompute limits in NotifyLoadingEnded > > We recently started resetting limits on incremental marking start > to avoid finalizing incremental marking prematurely in some scenarios. > > For loading we had a similar issue, in order to fix this we > recompute limits in NotifyLoadingEnded(). But resetting allocation > limits on incremental marking start also incidentally addresses the > issue Omer discovered with loading. So in this CL we simply stop > updating allocation limits at all in NotifyLoadingEnded(). > > Initially I wasn't sure whether a change like this should go through > finch. But according to Omer recomputing the limit on > NotifyLoadingEnded did not have impact, so going back to baseline > should not regress anything either. > > In addition this CL also starts resetting allocation limits > unconditionally on incremental marking start. Previously we only > did this when the loading phase was entered but not exited yet. > > Bug: 444705203 > Change-Id: I7dfbf6fcfc6c5db0b7e0416811c4bca85de6f420 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7368051 > Reviewed-by: Michael Lippautz <[email protected]> > Reviewed-by: Omer Katz <[email protected]> > Commit-Queue: Dominik Inführ <[email protected]> > Cr-Commit-Position: refs/heads/main@{#104524} Bug: 444705203 No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: I7b5840c2ecea403b9bc117c572b56a01a974bcfe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7415020 Reviewed-by: Manos Koukoutos <[email protected]> Owners-Override: Manos Koukoutos <[email protected]> Reviewed-by: Omer Katz <[email protected]> Commit-Queue: Manos Koukoutos <[email protected]> Cr-Commit-Position: refs/heads/main@{#104555}
1 parent d9c5853 commit 5fa62dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/heap/heap.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2041,7 +2041,7 @@ void Heap::StartIncrementalMarking(GCFlags gc_flags,
20412041

20422042
incremental_marking()->Start(collector, gc_reason, reason);
20432043

2044-
if (collector == GarbageCollector::MARK_COMPACTOR) {
2044+
if (collector == GarbageCollector::MARK_COMPACTOR && IsLoadingInitialized()) {
20452045
// During loading we might overshoot the limit by a large amount. Ensure
20462046
// allocation limits are at least at or above current sizes to not finalize
20472047
// incremental marking prematurely.
@@ -7854,6 +7854,7 @@ void Heap::NotifyLoadingStarted() {
78547854
void Heap::NotifyLoadingEnded(LeaveHeapState context) {
78557855
load_start_time_ms_.store(kLoadTimeNotLoading, std::memory_order_relaxed);
78567856
if (context == LeaveHeapState::kNotify) {
7857+
RecomputeLimitsAfterLoadingIfNeeded();
78577858
if (auto* job = incremental_marking()->incremental_marking_job()) {
78587859
// The task will start incremental marking (if needed not already started)
78597860
// and advance marking if incremental marking is active.

0 commit comments

Comments
 (0)