| Index: src/heap/incremental-marking.cc
|
| diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc
|
| index 6d759253dff79dfa6362d97af8547ce733de1b5b..cdd08e83102035d52c972515148ec4f85093efa1 100644
|
| --- a/src/heap/incremental-marking.cc
|
| +++ b/src/heap/incremental-marking.cc
|
| @@ -17,7 +17,6 @@
|
| namespace v8 {
|
| namespace internal {
|
|
|
| -
|
| IncrementalMarking::StepActions IncrementalMarking::IdleStepActions() {
|
| return StepActions(IncrementalMarking::NO_GC_VIA_STACK_GUARD,
|
| IncrementalMarking::FORCE_MARKING,
|
| @@ -27,6 +26,7 @@ IncrementalMarking::StepActions IncrementalMarking::IdleStepActions() {
|
|
|
| IncrementalMarking::IncrementalMarking(Heap* heap)
|
| : heap_(heap),
|
| + observer_(*this, kAllocatedThreshold),
|
| state_(STOPPED),
|
| is_compacting_(false),
|
| steps_count_(0),
|
| @@ -571,7 +571,8 @@ void IncrementalMarking::Start(const char* reason) {
|
| state_ = SWEEPING;
|
| }
|
|
|
| - heap_->LowerInlineAllocationLimit(kAllocatedThreshold);
|
| + heap_->new_space()->AddInlineAllocationObserver(&observer_);
|
| +
|
| incremental_marking_job()->Start(heap_);
|
| }
|
|
|
| @@ -846,7 +847,8 @@ void IncrementalMarking::Stop() {
|
| if (FLAG_trace_incremental_marking) {
|
| PrintF("[IncrementalMarking] Stopping.\n");
|
| }
|
| - heap_->ResetInlineAllocationLimit();
|
| +
|
| + heap_->new_space()->RemoveInlineAllocationObserver(&observer_);
|
| IncrementalMarking::set_should_hurry(false);
|
| ResetStepCounters();
|
| if (IsMarking()) {
|
| @@ -874,7 +876,8 @@ void IncrementalMarking::Finalize() {
|
| Hurry();
|
| state_ = STOPPED;
|
| is_compacting_ = false;
|
| - heap_->ResetInlineAllocationLimit();
|
| +
|
| + heap_->new_space()->RemoveInlineAllocationObserver(&observer_);
|
| IncrementalMarking::set_should_hurry(false);
|
| ResetStepCounters();
|
| PatchIncrementalMarkingRecordWriteStubs(heap_,
|
|
|