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

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: Addressed nit Created 5 years, 4 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 8fe341154fa0597113211ccc7dd8387a350a0c34..2c63cfcad6ade74752f06a6f51bc3cb127e29031 100644
--- a/src/heap/incremental-marking.h
+++ b/src/heap/incremental-marking.h
@@ -26,6 +26,21 @@ class IncrementalMarking {
enum GCRequestType { COMPLETE_MARKING, OVERAPPROXIMATION };
+ struct StepActions {
+ StepActions(CompletionAction complete_action_,
+ ForceMarkingAction force_marking_,
+ ForceCompletionAction force_completion_)
+ : completion_action(complete_action_),
+ force_marking(force_marking_),
+ force_completion(force_completion_) {}
+
+ CompletionAction completion_action;
+ ForceMarkingAction force_marking;
+ ForceCompletionAction force_completion;
+ };
+
+ static StepActions NoForcedStepActions();
+
explicit IncrementalMarking(Heap* heap);
static void Initialize();
@@ -67,7 +82,9 @@ class IncrementalMarking {
bool WasActivated();
- void Start(int mark_compact_flags);
+ void Start(int mark_compact_flags,
+ const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags,
+ const char* reason = nullptr);
void Stop();
@@ -185,6 +202,8 @@ class IncrementalMarking {
Heap* heap() const { return heap_; }
+ GCCallbackFlags CallbackFlags() const { return gc_callback_flags_; }
+
private:
int64_t SpaceLeftInOldSpace();
@@ -243,6 +262,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
This is Rietveld 408576698