Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 3340a0fd384a3cdf8bb9e11a90b00f9f00b3b249..0740a13c092c372810db746a655aa714ff6e8007 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -115,12 +115,8 @@ Heap::Heap() |
gc_safe_size_of_old_object_(NULL), |
total_regexp_code_generated_(0), |
tracer_(this), |
- new_space_high_promotion_mode_active_(false), |
- gathering_lifetime_feedback_(0), |
high_survival_rate_period_length_(0), |
promoted_objects_size_(0), |
- low_survival_rate_period_length_(0), |
- survival_rate_(0), |
promotion_ratio_(0), |
semi_space_copied_object_size_(0), |
previous_semi_space_copied_object_size_(0), |
@@ -129,8 +125,6 @@ Heap::Heap() |
nodes_copied_in_new_space_(0), |
nodes_promoted_(0), |
maximum_size_scavenges_(0), |
- previous_survival_rate_trend_(Heap::STABLE), |
- survival_rate_trend_(Heap::STABLE), |
max_gc_pause_(0.0), |
total_gc_time_ms_(0.0), |
max_alive_after_gc_(0), |
@@ -1200,24 +1194,6 @@ void Heap::UpdateSurvivalStatistics(int start_new_space_size) { |
} else { |
high_survival_rate_period_length_ = 0; |
} |
- |
- if (survival_rate < kYoungSurvivalRateLowThreshold) { |
- low_survival_rate_period_length_++; |
- } else { |
- low_survival_rate_period_length_ = 0; |
- } |
- |
- double survival_rate_diff = survival_rate_ - survival_rate; |
- |
- if (survival_rate_diff > kYoungSurvivalRateAllowedDeviation) { |
- set_survival_rate_trend(DECREASING); |
- } else if (survival_rate_diff < -kYoungSurvivalRateAllowedDeviation) { |
- set_survival_rate_trend(INCREASING); |
- } else { |
- set_survival_rate_trend(STABLE); |
- } |
- |
- survival_rate_ = survival_rate; |
} |
bool Heap::PerformGarbageCollection( |
@@ -1275,16 +1251,8 @@ bool Heap::PerformGarbageCollection( |
Scavenge(); |
} |
- bool deopted = ProcessPretenuringFeedback(); |
+ ProcessPretenuringFeedback(); |
UpdateSurvivalStatistics(start_new_space_size); |
- |
- // When pretenuring is collecting new feedback, we do not shrink the new space |
- // right away. |
- if (deopted) { |
- RecordDeoptForPretenuring(); |
- } else { |
- ConfigureNewGenerationSize(); |
- } |
ConfigureInitialOldGenerationSize(); |
isolate_->counters()->objs_since_last_young()->Set(0); |
@@ -1509,8 +1477,7 @@ void Heap::CheckNewSpaceExpansionCriteria() { |
survived_since_last_expansion_ = 0; |
} |
} else if (new_space_.TotalCapacity() < new_space_.MaximumCapacity() && |
- survived_since_last_expansion_ > new_space_.TotalCapacity() && |
- !new_space_high_promotion_mode_active_) { |
+ survived_since_last_expansion_ > new_space_.TotalCapacity()) { |
// Grow the size of new space if there is room to grow, and enough data |
// has survived scavenge since the last expansion. |
new_space_.Grow(); |
@@ -2664,48 +2631,6 @@ void Heap::ConfigureInitialOldGenerationSize() { |
} |
-void Heap::ConfigureNewGenerationSize() { |
- bool still_gathering_lifetime_data = gathering_lifetime_feedback_ != 0; |
- if (gathering_lifetime_feedback_ != 0) gathering_lifetime_feedback_--; |
- if (!new_space_high_promotion_mode_active_ && |
- new_space_.TotalCapacity() == new_space_.MaximumCapacity() && |
- IsStableOrIncreasingSurvivalTrend() && IsHighSurvivalRate()) { |
- // Stable high survival rates even though young generation is at |
- // maximum capacity indicates that most objects will be promoted. |
- // To decrease scavenger pauses and final mark-sweep pauses, we |
- // have to limit maximal capacity of the young generation. |
- if (still_gathering_lifetime_data) { |
- if (FLAG_trace_gc) { |
- PrintPID( |
- "Postpone entering high promotion mode as optimized pretenuring " |
- "code is still being generated\n"); |
- } |
- } else { |
- new_space_high_promotion_mode_active_ = true; |
- if (FLAG_trace_gc) { |
- PrintPID("Limited new space size due to high promotion rate: %d MB\n", |
- new_space_.InitialTotalCapacity() / MB); |
- } |
- } |
- } else if (new_space_high_promotion_mode_active_ && |
- IsStableOrDecreasingSurvivalTrend() && IsLowSurvivalRate()) { |
- // Decreasing low survival rates might indicate that the above high |
- // promotion mode is over and we should allow the young generation |
- // to grow again. |
- new_space_high_promotion_mode_active_ = false; |
- if (FLAG_trace_gc) { |
- PrintPID("Unlimited new space size due to low promotion rate: %d MB\n", |
- new_space_.MaximumCapacity() / MB); |
- } |
- } |
- |
- if (new_space_high_promotion_mode_active_ && |
- new_space_.TotalCapacity() > new_space_.InitialTotalCapacity()) { |
- new_space_.Shrink(); |
- } |
-} |
- |
- |
AllocationResult Heap::AllocatePartialMap(InstanceType instance_type, |
int instance_size) { |
Object* result = nullptr; |