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

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

Issue 997423002: Use the incremental root marking visitor for overapproximating the weak closure (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') | src/heap/mark-compact.h » ('j') | 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 76c05de6065be5da1c51e8a7f7f8894f1eed82fb..a60e5bc93dd93d41cee85d0ce03ee5619154d3d8 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -559,6 +559,26 @@ void IncrementalMarking::StartMarking(CompactionFlag flag) {
}
+void IncrementalMarking::MarkObjectGroups() {
+ DCHECK(FLAG_overapproximate_weak_closure);
+ DCHECK(!weak_closure_was_overapproximated_);
+
+ GCTracer::Scope gc_scope(heap_->tracer(),
+ GCTracer::Scope::MC_INCREMENTAL_WEAKCLOSURE);
+
+ heap_->mark_compact_collector()->MarkImplicitRefGroups();
jochen (gone - plz use gerrit) 2015/03/13 09:59:27 this might be wrong too, as it just marks the obje
+
+ IncrementalMarkingRootMarkingVisitor visitor(this);
+ heap_->isolate()->global_handles()->IterateObjectGroups(
+ &visitor, &MarkCompactCollector::IsUnmarkedHeapObjectWithHeap);
+
+ heap_->isolate()->global_handles()->RemoveImplicitRefGroups();
+ heap_->isolate()->global_handles()->RemoveObjectGroups();
+
+ weak_closure_was_overapproximated_ = true;
+}
+
+
void IncrementalMarking::PrepareForScavenge() {
if (!IsMarking()) return;
NewSpacePageIterator it(heap_->new_space()->FromSpaceStart(),
@@ -777,7 +797,6 @@ void IncrementalMarking::OverApproximateWeakClosure() {
if (FLAG_trace_incremental_marking) {
PrintF("[IncrementalMarking] requesting weak closure overapproximation.\n");
}
- set_should_hurry(true);
request_type_ = OVERAPPROXIMATION;
heap_->isolate()->stack_guard()->RequestGC();
}
« no previous file with comments | « src/heap/incremental-marking.h ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698