| 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_;
|
|
|
|
|