[heap] Guard starting of incremental marking with flag

Otherwise, we may execute the checkpoint more often which may change
timing on GCs unnecessarily as this code path is dependen on global
memory scheduling.

Bug: chromium:967573, chromium:948807
Change-Id: I8d5812dc752638801c6729b9b0c5640c3da945d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631608
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61874}
This commit is contained in:
Michael Lippautz 2019-05-28 10:16:59 +02:00 committed by Commit Bot
parent 9e5741a5bb
commit b528328d74

View File

@ -112,6 +112,8 @@ void LocalEmbedderHeapTracer::ProcessingScope::AddWrapperInfoForTesting(
}
void LocalEmbedderHeapTracer::StartIncrementalMarkingIfNeeded() {
if (!FLAG_global_gc_scheduling) return;
Heap* heap = isolate_->heap();
heap->StartIncrementalMarkingIfAllocationLimitIsReached(
heap->GCFlagsForIncrementalMarking(),