From a88475c0595d8534da78c799b90dad9064e89cd5 Mon Sep 17 00:00:00 2001 From: ulan Date: Tue, 4 Aug 2015 09:50:27 -0700 Subject: [PATCH] Revert d5419b for regressing v8.top_25_smooth benchmark. BUG=chromium:516425 LOG=NO Review URL: https://codereview.chromium.org/1271973002 Cr-Commit-Position: refs/heads/master@{#30008} --- src/heap/heap.cc | 10 +++------- src/heap/heap.h | 3 +-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/heap/heap.cc b/src/heap/heap.cc index 62c19ba..c17a7ac 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc @@ -1273,8 +1273,7 @@ bool Heap::PerformGarbageCollection( // Register the amount of external allocated memory. amount_of_external_allocated_memory_at_last_global_gc_ = amount_of_external_allocated_memory_; - SetOldGenerationAllocationLimit(old_gen_size, gc_speed, mutator_speed, - freed_global_handles); + SetOldGenerationAllocationLimit(old_gen_size, gc_speed, mutator_speed); } else if (HasLowYoungGenerationAllocationRate() && old_generation_size_configured_) { DampenOldGenerationAllocationLimit(old_gen_size, gc_speed, mutator_speed); @@ -5584,9 +5583,7 @@ intptr_t Heap::CalculateOldGenerationAllocationLimit(double factor, void Heap::SetOldGenerationAllocationLimit(intptr_t old_gen_size, double gc_speed, - double mutator_speed, - int freed_global_handles) { - const int kFreedGlobalHandlesThreshold = 700; + double mutator_speed) { const double kConservativeHeapGrowingFactor = 1.3; double factor = HeapGrowingFactor(gc_speed, mutator_speed); @@ -5606,8 +5603,7 @@ void Heap::SetOldGenerationAllocationLimit(intptr_t old_gen_size, factor = Min(factor, kMaxHeapGrowingFactorMemoryConstrained); } - if (freed_global_handles >= kFreedGlobalHandlesThreshold || - memory_reducer_.ShouldGrowHeapSlowly() || optimize_for_memory_usage_) { + if (memory_reducer_.ShouldGrowHeapSlowly() || optimize_for_memory_usage_) { factor = Min(factor, kConservativeHeapGrowingFactor); } diff --git a/src/heap/heap.h b/src/heap/heap.h index 45ff17e..48e3de8 100644 --- a/src/heap/heap.h +++ b/src/heap/heap.h @@ -1202,8 +1202,7 @@ class Heap { // Sets the allocation limit to trigger the next full garbage collection. void SetOldGenerationAllocationLimit(intptr_t old_gen_size, double gc_speed, - double mutator_speed, - int freed_global_handles); + double mutator_speed); // Decrease the allocation limit if the new limit based on the given // parameters is lower than the current limit. -- 2.7.4