Index: src/heap/heap.h |
diff --git a/src/heap/heap.h b/src/heap/heap.h |
index 9e63c5dc35e7497a88ae8c8c4daa4a075ba46e5d..878f41dc14aa50bc51eb719c6db5ca57e285996f 100644 |
--- a/src/heap/heap.h |
+++ b/src/heap/heap.h |
@@ -581,8 +581,6 @@ class Heap { |
}; |
typedef List<Chunk> Reservation; |
- static const int kInitalOldGenerationLimitFactor = 2; |
- |
#if V8_OS_ANDROID |
// Don't apply pointer multiplier on Android since it has no swap space and |
// should instead adapt it's heap size based on available physical memory. |
@@ -1721,8 +1719,6 @@ class Heap { |
// Flush the number to string cache. |
void FlushNumberStringCache(); |
- void ConfigureInitialOldGenerationSize(); |
- |
bool HasLowYoungGenerationAllocationRate(); |
bool HasLowOldGenerationAllocationRate(); |
double YoungGenerationMutatorUtilization(); |
@@ -1813,11 +1809,7 @@ class Heap { |
// GC statistics. ============================================================ |
// =========================================================================== |
- inline size_t OldGenerationSpaceAvailable() { |
- if (old_generation_allocation_limit_ <= PromotedTotalSize()) return 0; |
- return old_generation_allocation_limit_ - |
- static_cast<size_t>(PromotedTotalSize()); |
- } |
+ size_t OldGenerationSpaceAvailable(); |
void UpdateTotalGCTime(double duration); |
@@ -1827,6 +1819,16 @@ class Heap { |
// Growing strategy. ========================================================= |
// =========================================================================== |
+ static const int kInitalOldGenerationLimitFactor = 2; |
+ |
+ // For some webpages RAIL mode does not switch from PERFORMANCE_LOAD. |
+ // 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; |
+ |
+ bool ShouldOptimizeForLoadTime(); |
+ |
// Decrease the allocation limit if the new limit based on the given |
// parameters is lower than the current limit. |
void DampenOldGenerationAllocationLimit(size_t old_gen_size, double gc_speed, |
@@ -2116,7 +2118,6 @@ class Heap { |
size_t initial_semispace_size_; |
size_t max_old_generation_size_; |
size_t initial_old_generation_size_; |
- bool old_generation_size_configured_; |
size_t max_executable_size_; |
size_t maximum_committed_; |