Index: src/heap/incremental-marking.h |
diff --git a/src/heap/incremental-marking.h b/src/heap/incremental-marking.h |
index 59e64e467bda158df7beb5a578bd18524881ef20..3ab0f8d6c430ec69270844e72276cda2536f8ed7 100644 |
--- a/src/heap/incremental-marking.h |
+++ b/src/heap/incremental-marking.h |
@@ -8,6 +8,7 @@ |
#include "src/cancelable-task.h" |
#include "src/execution.h" |
#include "src/heap/incremental-marking-job.h" |
+#include "src/heap/spaces.h" |
#include "src/objects.h" |
namespace v8 { |
@@ -214,6 +215,21 @@ class IncrementalMarking { |
} |
private: |
+ class Observer : public InlineAllocationObserver { |
+ public: |
+ Observer(IncrementalMarking& incremental_marking, intptr_t step_size) |
+ : InlineAllocationObserver(step_size), |
+ incremental_marking_(incremental_marking) {} |
+ |
+ virtual void Step(int bytes_allocated) { |
+ incremental_marking_.Step(bytes_allocated, |
+ IncrementalMarking::GC_VIA_STACK_GUARD); |
+ } |
+ |
+ private: |
+ IncrementalMarking& incremental_marking_; |
+ }; |
+ |
int64_t SpaceLeftInOldSpace(); |
void SpeedUp(); |
@@ -248,6 +264,8 @@ class IncrementalMarking { |
Heap* heap_; |
+ Observer observer_; |
+ |
State state_; |
bool is_compacting_; |