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

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

Issue 894703002: Add a flag to over approximate the weak closure during GC (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 10 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 56c5a24c2ceb732ab90bc1865da5bf184e5f46f8..d6dfe17c7f2472ebb9ce76bdab694e1cb5a00708 100644
--- a/src/heap/incremental-marking.h
+++ b/src/heap/incremental-marking.h
@@ -24,6 +24,8 @@ class IncrementalMarking {
enum ForceCompletionAction { FORCE_COMPLETION, DO_NOT_FORCE_COMPLETION };
+ enum GCRequestType { COMPLETE_MARKING, OVERAPPROXIMATION };
+
explicit IncrementalMarking(Heap* heap);
static void Initialize();
@@ -36,6 +38,13 @@ class IncrementalMarking {
bool should_hurry() { return should_hurry_; }
void set_should_hurry(bool val) { should_hurry_ = val; }
+ bool weak_closure_was_overapproximated() const {
+ return weak_closure_was_overapproximated_;
+ }
+ void set_weak_closure_was_overapproximated(bool val) {
+ weak_closure_was_overapproximated_ = val;
+ }
+
inline bool IsStopped() { return state() == STOPPED; }
INLINE(bool IsMarking()) { return state() >= MARKING; }
@@ -44,6 +53,8 @@ class IncrementalMarking {
inline bool IsComplete() { return state() == COMPLETE; }
+ GCRequestType request_type() const { return request_type_; }
+
bool WorthActivating();
bool ShouldActivate();
@@ -66,6 +77,8 @@ class IncrementalMarking {
void Abort();
+ void OverApproximateWeakClosure();
+
void MarkingComplete(CompletionAction action);
void Epilogue();
@@ -228,6 +241,10 @@ class IncrementalMarking {
bool was_activated_;
+ bool weak_closure_was_overapproximated_;
+
+ GCRequestType request_type_;
+
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