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

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

Issue 1014503003: Hook up over approximating the weak closure to the idle time handler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 9 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/incremental-marking.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking.cc
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc
index bd0c0928cdc19f86feeaae5bc10dd8b69869c2fd..c27e81a8e127e2e2e0e4955ef06e0025c1898b8c 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -787,14 +787,16 @@ void IncrementalMarking::Finalize() {
}
-void IncrementalMarking::OverApproximateWeakClosure() {
+void IncrementalMarking::OverApproximateWeakClosure(CompletionAction action) {
DCHECK(FLAG_overapproximate_weak_closure);
DCHECK(!weak_closure_was_overapproximated_);
if (FLAG_trace_incremental_marking) {
PrintF("[IncrementalMarking] requesting weak closure overapproximation.\n");
}
request_type_ = OVERAPPROXIMATION;
- heap_->isolate()->stack_guard()->RequestGC();
+ if (action == GC_VIA_STACK_GUARD) {
+ heap_->isolate()->stack_guard()->RequestGC();
+ }
}
@@ -809,8 +811,8 @@ void IncrementalMarking::MarkingComplete(CompletionAction action) {
if (FLAG_trace_incremental_marking) {
PrintF("[IncrementalMarking] Complete (normal).\n");
}
+ request_type_ = COMPLETE_MARKING;
if (action == GC_VIA_STACK_GUARD) {
- request_type_ = COMPLETE_MARKING;
heap_->isolate()->stack_guard()->RequestGC();
}
}
@@ -963,9 +965,8 @@ intptr_t IncrementalMarking::Step(intptr_t allocated_bytes,
if (completion == FORCE_COMPLETION ||
IsIdleMarkingDelayCounterLimitReached()) {
if (FLAG_overapproximate_weak_closure &&
- !weak_closure_was_overapproximated_ &&
- action == GC_VIA_STACK_GUARD) {
- OverApproximateWeakClosure();
+ !weak_closure_was_overapproximated_) {
+ OverApproximateWeakClosure(action);
} else {
MarkingComplete(action);
}
« no previous file with comments | « src/heap/incremental-marking.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698