Index: src/heap.h |
diff --git a/src/heap.h b/src/heap.h |
index 6dc9d61117d93ff34041c093db077111a2a47ef6..4577a879ed1c34e83b368a32bd910bf81340a06e 100644 |
--- a/src/heap.h |
+++ b/src/heap.h |
@@ -1381,6 +1381,7 @@ class Heap { |
void CheckNewSpaceExpansionCriteria(); |
inline void IncrementYoungSurvivorsCounter(int survived) { |
+ ASSERT(survived >= 0); |
young_survivors_after_last_gc_ = survived; |
survived_since_last_expansion_ += survived; |
} |
@@ -1430,6 +1431,7 @@ class Heap { |
// Returns the size of objects residing in non new spaces. |
intptr_t PromotedSpaceSize(); |
+ intptr_t PromotedSpaceSizeOfObjects(); |
double total_regexp_code_generated() { return total_regexp_code_generated_; } |
void IncreaseTotalRegexpCodeGenerated(int size) { |
@@ -1799,11 +1801,13 @@ class Heap { |
enum SurvivalRateTrend { INCREASING, STABLE, DECREASING, FLUCTUATING }; |
- static const int kYoungSurvivalRateThreshold = 90; |
+ static const int kYoungSurvivalRateHighThreshold = 90; |
+ static const int kYoungSurvivalRateLowThreshold = 10; |
static const int kYoungSurvivalRateAllowedDeviation = 15; |
int young_survivors_after_last_gc_; |
int high_survival_rate_period_length_; |
+ int low_survival_rate_period_length_; |
double survival_rate_; |
SurvivalRateTrend previous_survival_rate_trend_; |
SurvivalRateTrend survival_rate_trend_; |
@@ -1836,18 +1840,28 @@ class Heap { |
} |
} |
- bool IsIncreasingSurvivalTrend() { |
- return survival_rate_trend() == INCREASING; |
+ bool IsStableOrDecreasingSurvivalTrend() { |
+ switch (survival_rate_trend()) { |
+ case STABLE: |
+ case DECREASING: |
+ return true; |
+ default: |
+ return false; |
+ } |
} |
- bool IsDecreasingSurvivalTrend() { |
- return survival_rate_trend() == DECREASING; |
+ bool IsIncreasingSurvivalTrend() { |
+ return survival_rate_trend() == INCREASING; |
} |
bool IsHighSurvivalRate() { |
return high_survival_rate_period_length_ > 0; |
} |
+ bool IsLowSurvivalRate() { |
+ return low_survival_rate_period_length_ > 0; |
+ } |
+ |
void SelectScavengingVisitorsTable(); |
void StartIdleRound() { |