Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index f2f4e04f0cfeea88bc527d1272878a15cfddef72..2e90174ba019021814d2b576e4b1be4e35cde7c4 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -63,8 +63,6 @@ |
initial_semispace_size_(Page::kPageSize), |
target_semispace_size_(Page::kPageSize), |
max_old_generation_size_(700ul * (kPointerSize / 4) * MB), |
- initial_old_generation_size_(max_old_generation_size_), |
- old_generation_size_configured_(false), |
max_executable_size_(256ul * (kPointerSize / 4) * MB), |
// Variables set based on semispace_size_ and old_generation_size_ in |
// ConfigureHeap. |
@@ -99,7 +97,7 @@ |
#ifdef DEBUG |
allocation_timeout_(0), |
#endif // DEBUG |
- old_generation_allocation_limit_(initial_old_generation_size_), |
+ old_generation_allocation_limit_(kMinimumOldGenerationAllocationLimit), |
old_gen_exhausted_(false), |
inline_allocation_disabled_(false), |
store_buffer_rebuilder_(store_buffer()), |
@@ -109,9 +107,8 @@ |
tracer_(this), |
high_survival_rate_period_length_(0), |
promoted_objects_size_(0), |
- promotion_ratio_(0), |
+ promotion_rate_(0), |
semi_space_copied_object_size_(0), |
- previous_semi_space_copied_object_size_(0), |
semi_space_copied_rate_(0), |
nodes_died_in_new_space_(0), |
nodes_copied_in_new_space_(0), |
@@ -436,7 +433,6 @@ |
// Reset GC statistics. |
promoted_objects_size_ = 0; |
- previous_semi_space_copied_object_size_ = semi_space_copied_object_size_; |
semi_space_copied_object_size_ = 0; |
nodes_died_in_new_space_ = 0; |
nodes_copied_in_new_space_ = 0; |
@@ -1040,23 +1036,14 @@ |
void Heap::UpdateSurvivalStatistics(int start_new_space_size) { |
if (start_new_space_size == 0) return; |
- promotion_ratio_ = (static_cast<double>(promoted_objects_size_) / |
- static_cast<double>(start_new_space_size) * 100); |
- |
- if (previous_semi_space_copied_object_size_ > 0) { |
- promotion_rate_ = |
- (static_cast<double>(promoted_objects_size_) / |
- static_cast<double>(previous_semi_space_copied_object_size_) * 100); |
- } else { |
- promotion_rate_ = 0; |
- } |
+ promotion_rate_ = (static_cast<double>(promoted_objects_size_) / |
+ static_cast<double>(start_new_space_size) * 100); |
semi_space_copied_rate_ = |
(static_cast<double>(semi_space_copied_object_size_) / |
static_cast<double>(start_new_space_size) * 100); |
- double survival_rate = promotion_ratio_ + semi_space_copied_rate_; |
- tracer()->AddSurvivalRate(survival_rate); |
+ double survival_rate = promotion_rate_ + semi_space_copied_rate_; |
if (survival_rate > kYoungSurvivalRateHighThreshold) { |
high_survival_rate_period_length_++; |
@@ -1114,13 +1101,11 @@ |
old_generation_allocation_limit_ = |
OldGenerationAllocationLimit(PromotedSpaceSizeOfObjects(), 0); |
old_gen_exhausted_ = false; |
- old_generation_size_configured_ = true; |
} else { |
Scavenge(); |
} |
UpdateSurvivalStatistics(start_new_space_size); |
- ConfigureInitialOldGenerationSize(); |
isolate_->counters()->objs_since_last_young()->Set(0); |
@@ -2353,17 +2338,6 @@ |
SLOW_DCHECK(!first_word.IsForwardingAddress()); |
Map* map = first_word.ToMap(); |
map->GetHeap()->DoScavengeObject(map, p, object); |
-} |
- |
- |
-void Heap::ConfigureInitialOldGenerationSize() { |
- if (!old_generation_size_configured_ && tracer()->SurvivalEventsRecorded()) { |
- old_generation_allocation_limit_ = |
- Max(kMinimumOldGenerationAllocationLimit, |
- static_cast<intptr_t>( |
- static_cast<double>(initial_old_generation_size_) * |
- (tracer()->AverageSurvivalRate() / 100))); |
- } |
} |
@@ -5178,13 +5152,6 @@ |
max_old_generation_size_ = |
Max(static_cast<intptr_t>(paged_space_count * Page::kPageSize), |
max_old_generation_size_); |
- |
- if (FLAG_initial_old_space_size > 0) { |
- initial_old_generation_size_ = FLAG_initial_old_space_size * MB; |
- } else { |
- initial_old_generation_size_ = max_old_generation_size_; |
- } |
- old_generation_allocation_limit_ = initial_old_generation_size_; |
// We rely on being able to allocate new arrays in paged spaces. |
DCHECK(Page::kMaxRegularHeapObjectSize >= |