Commit 3283d6d3 authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Abort AdvanceIncrementalMarking when we do not make marking progress.

BUG=v8:4804
LOG=n

Review URL: https://codereview.chromium.org/1853463004

Cr-Commit-Position: refs/heads/master@{#35205}
parent 58f2be43
......@@ -1030,12 +1030,15 @@ double IncrementalMarking::AdvanceIncrementalMarking(
}
double remaining_time_in_ms = 0.0;
intptr_t bytes_processed = 0;
do {
Step(step_size_in_bytes, step_actions.completion_action,
step_actions.force_marking, step_actions.force_completion);
bytes_processed =
Step(step_size_in_bytes, step_actions.completion_action,
step_actions.force_marking, step_actions.force_completion);
remaining_time_in_ms =
deadline_in_ms - heap()->MonotonicallyIncreasingTimeInMs();
} while (remaining_time_in_ms >=
} while (bytes_processed > 0 &&
remaining_time_in_ms >=
2.0 * GCIdleTimeHandler::kIncrementalMarkingStepTimeInMs &&
!IsComplete() &&
!heap()->mark_compact_collector()->marking_deque()->IsEmpty());
......@@ -1183,7 +1186,8 @@ intptr_t IncrementalMarking::Step(intptr_t allocated_bytes,
bytes_scanned_ = 0;
StartMarking();
}
} else if (state_ == MARKING) {
}
if (state_ == MARKING) {
bytes_processed = ProcessMarkingDeque(bytes_to_process);
if (heap_->mark_compact_collector()->marking_deque()->IsEmpty()) {
if (completion == FORCE_COMPLETION ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment