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

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

Issue 1012593004: Repeatedly overapproximate the weak closure as long as we make progress (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/heap.cc ('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..35768b79c09931dbe83eb317c36e11073a19a861 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -549,8 +549,8 @@ void IncrementalMarking::MarkObjectGroups() {
DCHECK(FLAG_overapproximate_weak_closure);
DCHECK(!weak_closure_was_overapproximated_);
- GCTracer::Scope gc_scope(heap_->tracer(),
- GCTracer::Scope::MC_INCREMENTAL_WEAKCLOSURE);
+ int old_marking_deque_top =
+ heap_->mark_compact_collector()->marking_deque()->top();
heap_->mark_compact_collector()->MarkImplicitRefGroups(&MarkObject);
@@ -558,10 +558,16 @@ void IncrementalMarking::MarkObjectGroups() {
heap_->isolate()->global_handles()->IterateObjectGroups(
&visitor, &MarkCompactCollector::IsUnmarkedHeapObjectWithHeap);
+ int marking_progress =
+ abs(old_marking_deque_top -
+ heap_->mark_compact_collector()->marking_deque()->top());
+
+ if (marking_progress < FLAG_min_progress_during_object_groups_marking) {
+ weak_closure_was_overapproximated_ = true;
+ }
+
heap_->isolate()->global_handles()->RemoveImplicitRefGroups();
heap_->isolate()->global_handles()->RemoveObjectGroups();
-
- weak_closure_was_overapproximated_ = true;
}
« no previous file with comments | « src/heap/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698