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

Unified Diff: src/heap/heap.cc

Issue 2359903002: [heap] New heuristics for incremental marking step size. (Closed)
Patch Set: use space iterator Created 4 years, 3 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') | src/heap/incremental-marking.h » ('j') | 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 0946d941244a76019cd72c71578f29a15a49c046..9686e0dac2129bd784305be2032200965f616d95 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -115,7 +115,6 @@ Heap::Heap()
inline_allocation_disabled_(false),
total_regexp_code_generated_(0),
tracer_(nullptr),
- high_survival_rate_period_length_(0),
promoted_objects_size_(0),
promotion_ratio_(0),
semi_space_copied_object_size_(0),
@@ -141,7 +140,7 @@ Heap::Heap()
full_codegen_bytes_generated_(0),
crankshaft_codegen_bytes_generated_(0),
new_space_allocation_counter_(0),
- old_generation_allocation_counter_(0),
+ old_generation_allocation_counter_at_last_gc_(0),
old_generation_size_at_last_gc_(0),
gcs_since_last_deopt_(0),
global_pretenuring_feedback_(nullptr),
@@ -1270,11 +1269,6 @@ void Heap::UpdateSurvivalStatistics(int start_new_space_size) {
double survival_rate = promotion_ratio_ + semi_space_copied_rate_;
tracer()->AddSurvivalRatio(survival_rate);
- if (survival_rate > kYoungSurvivalRateHighThreshold) {
- high_survival_rate_period_length_++;
- } else {
- high_survival_rate_period_length_ = 0;
- }
}
bool Heap::PerformGarbageCollection(
@@ -1311,13 +1305,6 @@ bool Heap::PerformGarbageCollection(
int start_new_space_size = Heap::new_space()->SizeAsInt();
- if (IsHighSurvivalRate()) {
- // We speed up the incremental marker if it is running so that it
- // does not fall behind the rate of promotion, which would cause a
- // constantly growing old space.
- incremental_marking()->NotifyOfHighPromotionRate();
- }
-
{
Heap::PretenuringScope pretenuring_scope(this);
@@ -1328,7 +1315,7 @@ bool Heap::PerformGarbageCollection(
old_generation_size_configured_ = true;
// This should be updated before PostGarbageCollectionProcessing, which
// can cause another GC. Take into account the objects promoted during GC.
- old_generation_allocation_counter_ +=
+ old_generation_allocation_counter_at_last_gc_ +=
static_cast<size_t>(promoted_objects_size_);
old_generation_size_at_last_gc_ = PromotedSpaceSizeOfObjects();
} else {
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698