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

Unified Diff: src/heap/incremental-marking.h

Issue 2290333002: [heap] Simplify heuristics for incremental step size. (Closed)
Patch Set: x Created 4 years, 4 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.cc ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking.h
diff --git a/src/heap/incremental-marking.h b/src/heap/incremental-marking.h
index 0ba0f2ce5331734656fbf1e5f0e2717c263d7d90..34332b00f3f2198fa3338872c372b195693def7d 100644
--- a/src/heap/incremental-marking.h
+++ b/src/heap/incremental-marking.h
@@ -123,16 +123,12 @@ class IncrementalMarking {
// heavy (color-checking) write barriers have been invoked.
static const intptr_t kAllocatedThreshold = 65536;
static const intptr_t kWriteBarriersInvokedThreshold = 32768;
- // Start off by marking this many times more memory than has been allocated.
- static const intptr_t kInitialMarkingSpeed = 1;
- // But if we are promoting a lot of data we need to mark faster to keep up
- // with the data that is entering the old space through promotion.
- static const intptr_t kFastMarking = 3;
- // After this many steps we increase the marking/allocating factor.
- static const intptr_t kMarkingSpeedAccellerationInterval = 1024;
- // This is how much we increase the marking/allocating factor by.
- static const intptr_t kMarkingSpeedAccelleration = 2;
- static const intptr_t kMaxMarkingSpeed = 1000;
+ // Cap the write barrier counter to avoid overflows.
+ static const intptr_t kMaxWriteBarrierCounter = 1 << 20;
+ // These constants are arbitrary and chosen based on benchmarks.
+ static const intptr_t kBytesToMarkPerAllocatedByte = 3;
+ static const intptr_t kBytesToMarkPerWriteBarrier = 10;
+ static const intptr_t kMinIncrementalStepDurationInMs = 1;
// This is the upper bound for how many times we allow finalization of
// incremental marking to be postponed.
@@ -187,8 +183,6 @@ class IncrementalMarking {
void ActivateGeneratedStub(Code* stub);
- void NotifyOfHighPromotionRate();
-
void NotifyIncompleteScanOfObject(int unscanned_bytes) {
unscanned_bytes_of_large_object_ = unscanned_bytes;
}
@@ -255,8 +249,6 @@ class IncrementalMarking {
int64_t SpaceLeftInOldSpace();
- void SpeedUp();
-
void ResetStepCounters();
void StartMarking();
@@ -301,13 +293,7 @@ class IncrementalMarking {
State state_;
bool is_compacting_;
- int steps_count_;
- int64_t old_generation_space_available_at_start_of_incremental_;
- int64_t old_generation_space_used_at_start_of_incremental_;
- int64_t bytes_rescanned_;
bool should_hurry_;
- int marking_speed_;
- intptr_t bytes_scanned_;
intptr_t allocated_;
intptr_t write_barriers_invoked_since_last_step_;
size_t idle_marking_delay_counter_;
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698