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

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

Issue 2735803005: [heap] Start concurrent marking simultaneously with incremental marking. (Closed)
Patch Set: tweak Created 3 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
Index: src/heap/incremental-marking.cc
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc
index 437cf12b256d510586a5daaf4c3806024e154987..90f6c36a572df7c0775bc5f22437481932726425 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -7,6 +7,7 @@
#include "src/code-stubs.h"
#include "src/compilation-cache.h"
#include "src/conversions.h"
+#include "src/heap/concurrent-marking.h"
#include "src/heap/gc-idle-time-handler.h"
#include "src/heap/gc-tracer.h"
#include "src/heap/heap-inl.h"
@@ -546,6 +547,15 @@ void IncrementalMarking::StartMarking() {
IncrementalMarkingRootMarkingVisitor visitor(this);
heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG);
+ if (FLAG_concurrent_marking) {
+ ConcurrentMarking* concurrent_marking = heap_->concurrent_marking();
+ heap_->mark_compact_collector()->marking_deque()->Iterate(
+ [concurrent_marking](HeapObject* obj) {
+ concurrent_marking->AddRoot(obj);
+ });
+ concurrent_marking->StartMarkingTask();
+ }
+
// Ready to start incremental marking.
if (FLAG_trace_incremental_marking) {
heap()->isolate()->PrintWithTimestamp("[IncrementalMarking] Running\n");

Powered by Google App Engine
This is Rietveld 408576698