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

Unified Diff: src/heap/heap.cc

Issue 849693004: Use more conservative average promotion ratio for initial heap size. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/gc-tracer.cc ('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 641bae04eddff2de9ae2cc61415e3574348e6f1d..d4550949035c07e573287a67ce0596a885c5d064 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -67,7 +67,7 @@ Heap::Heap()
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_ / 2),
+ 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
@@ -1048,6 +1048,8 @@ 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_) /
@@ -1061,8 +1063,6 @@ 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()->AddSurvivalRate(survival_rate);
-
if (survival_rate > kYoungSurvivalRateHighThreshold) {
high_survival_rate_period_length_++;
} else {
@@ -2372,7 +2372,7 @@ void Heap::ConfigureInitialOldGenerationSize() {
Max(kMinimumOldGenerationAllocationLimit,
static_cast<intptr_t>(
static_cast<double>(initial_old_generation_size_) *
- (tracer()->AverageSurvivalRate() / 100)));
+ (tracer()->AveragePromotionRatio() / 100)));
}
}
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698