Commit b011c781 authored by hpayer's avatar hpayer Committed by Commit Bot

[heap] Reland use larger marking steps during external allocation pressure

This reverts commit 195eab46.

BUG=chromium:626082, chromium:728228

Review-Url: https://codereview.chromium.org/2931393002
Cr-Commit-Position: refs/heads/master@{#45843}
parent c31302d0
...@@ -952,15 +952,13 @@ void Heap::ReportExternalMemoryPressure() { ...@@ -952,15 +952,13 @@ void Heap::ReportExternalMemoryPressure() {
} }
} else { } else {
// Incremental marking is turned on an has already been started. // Incremental marking is turned on an has already been started.
const double pressure = const double kMinStepSize = 5;
static_cast<double>(external_memory_ - const double kMaxStepSize = 10;
external_memory_at_last_mark_compact_ - const double ms_step =
kExternalAllocationSoftLimit) / Min(kMaxStepSize,
external_memory_hard_limit(); Max(kMinStepSize, static_cast<double>(external_memory_) /
DCHECK_GE(1, pressure); external_memory_limit_ * kMinStepSize));
const double kMaxStepSizeOnExternalLimit = 25; const double deadline = MonotonicallyIncreasingTimeInMs() + ms_step;
const double deadline = MonotonicallyIncreasingTimeInMs() +
pressure * kMaxStepSizeOnExternalLimit;
incremental_marking()->AdvanceIncrementalMarking( incremental_marking()->AdvanceIncrementalMarking(
deadline, IncrementalMarking::GC_VIA_STACK_GUARD, deadline, IncrementalMarking::GC_VIA_STACK_GUARD,
IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8); IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8);
......
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