Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(670)

Unified Diff: src/heap/heap.cc

Issue 936773002: Always shrink initial old generation size based on survival rate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/heap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index d4cd78ebdaa7f1161ff56ea45a5cfdf6f6fe3e8e..a67bf050b2ee2aa6c677aff8d1cd308d05f654ea 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1092,8 +1092,6 @@ void Heap::UpdateSurvivalStatistics(int start_new_space_size) {
promotion_ratio_ = (static_cast<double>(promoted_objects_size_) /
static_cast<double>(start_new_space_size) * 100);
- if (gc_count_ > 1) tracer()->AddPromotionRatio(promotion_ratio_);
-
if (previous_semi_space_copied_object_size_ > 0) {
promotion_rate_ =
(static_cast<double>(promoted_objects_size_) /
@@ -1107,6 +1105,7 @@ void Heap::UpdateSurvivalStatistics(int start_new_space_size) {
static_cast<double>(start_new_space_size) * 100);
double survival_rate = promotion_ratio_ + semi_space_copied_rate_;
+ tracer()->AddSurvivalRatio(survival_rate);
if (survival_rate > kYoungSurvivalRateHighThreshold) {
high_survival_rate_period_length_++;
} else {
@@ -2418,8 +2417,8 @@ void Heap::ConfigureInitialOldGenerationSize() {
old_generation_allocation_limit_ =
Max(kMinimumOldGenerationAllocationLimit,
static_cast<intptr_t>(
- static_cast<double>(initial_old_generation_size_) *
- (tracer()->AveragePromotionRatio() / 100)));
+ static_cast<double>(old_generation_allocation_limit_) *
+ (tracer()->AverageSurvivalRatio() / 100)));
}
}
« no previous file with comments | « src/heap/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698