Commit 039e29f7 authored by ulan's avatar ulan Committed by Commit bot

[heap] Use RAIL mode for starting incremental marking.

This patch delays start of incremental marking during L phase of RAIL
and adjusts ShouldOptimizeForLoadTime to check allocation limit.

BUG=chromium:613518

Review-Url: https://codereview.chromium.org/2583033003
Cr-Commit-Position: refs/heads/master@{#41797}
parent 58247e87
......@@ -5308,7 +5308,7 @@ void Heap::DampenOldGenerationAllocationLimit(size_t old_gen_size,
bool Heap::ShouldOptimizeForLoadTime() {
return isolate()->rail_mode() == PERFORMANCE_LOAD &&
PromotedTotalSize() < initial_old_generation_size_ &&
!AllocationLimitOvershotByLargeMargin() &&
MonotonicallyIncreasingTimeInMs() <
isolate()->LoadStartTimeMs() + kMaxLoadTimeMs;
}
......@@ -5360,9 +5360,13 @@ Heap::IncrementalMarkingLimit Heap::IncrementalMarkingLimitReached() {
if (old_generation_space_available > new_space_->Capacity()) {
return IncrementalMarkingLimit::kNoLimit;
}
// We are close to the allocation limit.
// Choose between the hard and the soft limits.
if (old_generation_space_available == 0 || ShouldOptimizeForMemoryUsage()) {
if (ShouldOptimizeForMemoryUsage()) {
return IncrementalMarkingLimit::kHardLimit;
}
if (ShouldOptimizeForLoadTime()) {
return IncrementalMarkingLimit::kNoLimit;
}
if (old_generation_space_available == 0) {
return IncrementalMarkingLimit::kHardLimit;
}
return IncrementalMarkingLimit::kSoftLimit;
......
......@@ -1854,7 +1854,7 @@ class Heap {
// This constant limits the effect of load RAIL mode on GC.
// The value is arbitrary and chosen as the largest load time observed in
// v8 browsing benchmarks.
static const int kMaxLoadTimeMs = 3000;
static const int kMaxLoadTimeMs = 7000;
bool ShouldOptimizeForLoadTime();
......
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