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

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

Issue 629903003: Check if there is still time before finalizing an incremental collection. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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
Index: src/heap/incremental-marking.h
diff --git a/src/heap/incremental-marking.h b/src/heap/incremental-marking.h
index e4a8e972ca8fb10a08073a9dd8bf0fdb6efcdb03..434b73f12b85b2727cb1779cfd36ce5de2207171 100644
--- a/src/heap/incremental-marking.h
+++ b/src/heap/incremental-marking.h
@@ -83,10 +83,14 @@ class IncrementalMarking {
static const intptr_t kMarkingSpeedAccelleration = 2;
static const intptr_t kMaxMarkingSpeed = 1000;
+ // This is the upper bound for how many times we allow finalization of
+ // incremental marking to be postponed.
+ static const size_t kMaxIdleMarkingDelayCounter = 3;
+
void OldSpaceStep(intptr_t allocated);
void Step(intptr_t allocated, CompletionAction action,
- bool force_marking = false);
+ bool force_marking = false, bool force_completion = true);
inline void RestartIfNotMarking() {
if (state_ == COMPLETE) {
@@ -165,6 +169,8 @@ class IncrementalMarking {
unscanned_bytes_of_large_object_ = unscanned_bytes;
}
+ void ClearIdleMarkingDelayCounter();
+
private:
int64_t SpaceLeftInOldSpace();
@@ -195,6 +201,10 @@ class IncrementalMarking {
INLINE(void VisitObject(Map* map, HeapObject* obj, int size));
+ bool IsIdleMarkingDelayCounterLimitReached();
+
+ void IncrementIdleMarkingDelayCounter();
+
Heap* heap_;
State state_;
@@ -213,6 +223,7 @@ class IncrementalMarking {
intptr_t bytes_scanned_;
intptr_t allocated_;
intptr_t write_barriers_invoked_since_last_step_;
+ size_t idle_marking_delay_counter_;
int no_marking_scope_depth_;

Powered by Google App Engine
This is Rietveld 408576698