Commit 9a18a2d9 authored by Omer Katz's avatar Omer Katz Committed by Commit Bot

heap: Restart concurrent markers when v8 helps

If the v8 marker is fast it can help Oilpan with marking.
This is a good opportunity to restart any concurrent markers that died.

Bug: 986235
Change-Id: I47cbde413e875206d0cd468699f6309d06222f6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2002614
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: default avatarMichael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733613}
parent 9189f6dd
...@@ -1217,7 +1217,7 @@ void ThreadState::IncrementalMarkingStep(BlinkGC::StackState stack_state, ...@@ -1217,7 +1217,7 @@ void ThreadState::IncrementalMarkingStep(BlinkGC::StackState stack_state,
if (base::FeatureList::IsEnabled( if (base::FeatureList::IsEnabled(
blink::features::kBlinkHeapConcurrentMarking)) { blink::features::kBlinkHeapConcurrentMarking)) {
complete = complete && ConcurrentMarkingStep(); complete = ConcurrentMarkingStep() && complete;
} }
if (complete) { if (complete) {
......
...@@ -134,6 +134,11 @@ bool UnifiedHeapController::AdvanceTracing(double deadline_in_ms) { ...@@ -134,6 +134,11 @@ bool UnifiedHeapController::AdvanceTracing(double deadline_in_ms) {
base::TimeTicks deadline = base::TimeTicks deadline =
base::TimeTicks() + base::TimeDelta::FromMillisecondsD(deadline_in_ms); base::TimeTicks() + base::TimeDelta::FromMillisecondsD(deadline_in_ms);
is_tracing_done_ = thread_state_->MarkPhaseAdvanceMarking(deadline); is_tracing_done_ = thread_state_->MarkPhaseAdvanceMarking(deadline);
if (base::FeatureList::IsEnabled(
blink::features::kBlinkHeapConcurrentMarking)) {
is_tracing_done_ =
thread_state_->ConcurrentMarkingStep() && is_tracing_done_;
}
return is_tracing_done_; return is_tracing_done_;
} }
thread_state_->AtomicPauseMarkTransitiveClosure(); thread_state_->AtomicPauseMarkTransitiveClosure();
......
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