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

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

Issue 2872263002: [heap] Synchronize young generation GC with concurrent marking. (Closed)
Patch Set: add guard in Heap::EvacuateYoungGeneration Created 3 years, 7 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/crankshaft/hydrogen-environment-liveness.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/concurrent-marking.cc
diff --git a/src/heap/concurrent-marking.cc b/src/heap/concurrent-marking.cc
index 85cee07943148993287d1535fc4b9ec113efa53a..099715759a7e91e5886af2b923e2a55b23a6eda2 100644
--- a/src/heap/concurrent-marking.cc
+++ b/src/heap/concurrent-marking.cc
@@ -185,10 +185,12 @@ ConcurrentMarking::~ConcurrentMarking() { delete visitor_; }
void ConcurrentMarking::Run() {
double time_ms = heap_->MonotonicallyIncreasingTimeInMs();
size_t bytes_marked = 0;
+ base::Mutex* relocation_mutex = heap_->relocation_mutex();
{
TimedScope scope(&time_ms);
HeapObject* object;
while ((object = deque_->Pop(MarkingThread::kConcurrent)) != nullptr) {
+ base::LockGuard<base::Mutex> guard(relocation_mutex);
bytes_marked += visitor_->Visit(object);
}
}
« no previous file with comments | « src/crankshaft/hydrogen-environment-liveness.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698