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

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

Issue 1404523002: [heap] inline allocation steps refactor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: work-around the requirements that set_limit needs to be aligned Created 5 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698