| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index 2861f2306321d21609f26296cdd2380d558f155f..ddf550ac4ac62280b22cb2a5b718fa7ec42cc4ba 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -53,10 +53,10 @@ struct Heap::StrongRootsList {
|
| StrongRootsList* next;
|
| };
|
|
|
| -class IdleScavengeObserver : public InlineAllocationObserver {
|
| +class IdleScavengeObserver : public AllocationObserver {
|
| public:
|
| IdleScavengeObserver(Heap& heap, intptr_t step_size)
|
| - : InlineAllocationObserver(step_size), heap_(heap) {}
|
| + : AllocationObserver(step_size), heap_(heap) {}
|
|
|
| void Step(int bytes_allocated, Address, size_t) override {
|
| heap_.ScheduleIdleScavengeIfNeeded(bytes_allocated);
|
| @@ -1422,7 +1422,7 @@ void Heap::CallGCEpilogueCallbacks(GCType gc_type,
|
|
|
|
|
| void Heap::MarkCompact() {
|
| - PauseInlineAllocationObserversScope pause_observers(new_space());
|
| + PauseAllocationObserversScope pause_observers(this);
|
|
|
| gc_state_ = MARK_COMPACT;
|
| LOG(isolate_, ResourceEvent("markcompact", "begin"));
|
| @@ -1629,7 +1629,7 @@ void Heap::Scavenge() {
|
|
|
| // Bump-pointer allocations done during scavenge are not real allocations.
|
| // Pause the inline allocation steps.
|
| - PauseInlineAllocationObserversScope pause_observers(new_space());
|
| + PauseAllocationObserversScope pause_observers(this);
|
|
|
| #ifdef VERIFY_HEAP
|
| if (FLAG_verify_heap) VerifyNonPointerSpacePointers(this);
|
| @@ -5147,7 +5147,7 @@ bool Heap::SetUp() {
|
|
|
| idle_scavenge_observer_ = new IdleScavengeObserver(
|
| *this, ScavengeJob::kBytesAllocatedBeforeNextIdleTask);
|
| - new_space()->AddInlineAllocationObserver(idle_scavenge_observer_);
|
| + new_space()->AddAllocationObserver(idle_scavenge_observer_);
|
|
|
| return true;
|
| }
|
| @@ -5247,7 +5247,7 @@ void Heap::TearDown() {
|
| PrintAlloctionsHash();
|
| }
|
|
|
| - new_space()->RemoveInlineAllocationObserver(idle_scavenge_observer_);
|
| + new_space()->RemoveAllocationObserver(idle_scavenge_observer_);
|
| delete idle_scavenge_observer_;
|
| idle_scavenge_observer_ = nullptr;
|
|
|
|
|