Chromium Code Reviews

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

Issue 1273483002: GC: Refactor public incremental marking interface in heap (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« 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 8fe341154fa0597113211ccc7dd8387a350a0c34..2173183a22133d444abb8d4d0b282da3b3b30947 100644
--- a/src/heap/incremental-marking.h
+++ b/src/heap/incremental-marking.h
@@ -26,6 +26,20 @@ class IncrementalMarking {
enum GCRequestType { COMPLETE_MARKING, OVERAPPROXIMATION };
+ struct StepActions {
+ StepActions(
+ CompletionAction complete_action_ = NO_GC_VIA_STACK_GUARD,
ulan 2015/08/04 13:13:31 For readability of the call site, I would prefer p
Michael Lippautz 2015/08/04 13:55:35 Done.
+ ForceMarkingAction force_marking_ = DO_NOT_FORCE_MARKING,
+ ForceCompletionAction force_completion_ = DO_NOT_FORCE_COMPLETION)
+ : completion_action(complete_action_),
+ force_marking(force_marking_),
+ force_completion(force_completion_) {}
+
+ CompletionAction completion_action;
+ ForceMarkingAction force_marking;
+ ForceCompletionAction force_completion;
+ };
+
explicit IncrementalMarking(Heap* heap);
static void Initialize();
@@ -67,7 +81,8 @@ class IncrementalMarking {
bool WasActivated();
- void Start(int mark_compact_flags);
+ void Start(int mark_compact_flags,
+ const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags);
void Stop();
@@ -185,6 +200,8 @@ class IncrementalMarking {
Heap* heap() const { return heap_; }
+ GCCallbackFlags CallbackFlags() const { return gc_callback_flags_; }
+
private:
int64_t SpaceLeftInOldSpace();
@@ -243,6 +260,8 @@ class IncrementalMarking {
GCRequestType request_type_;
+ GCCallbackFlags gc_callback_flags_;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking);
};
}
« 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