Commit 407b635c authored by Omer Katz's avatar Omer Katz Committed by Commit Bot

heap: MarkingVisitor should also flush write_barrier_worklist_

Bug: 986235
Change-Id: Idf6c50f07977804ae4a9d78a904043ab0bb7ba8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007049Reviewed-by: default avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732791}
parent d6d10b7c
...@@ -280,8 +280,9 @@ void MarkingVisitor::ConservativelyMarkAddress(BasePage* page, ...@@ -280,8 +280,9 @@ void MarkingVisitor::ConservativelyMarkAddress(BasePage* page,
AccountMarkedBytes(header); AccountMarkedBytes(header);
} }
void MarkingVisitor::FlushMarkingWorklist() { void MarkingVisitor::FlushMarkingWorklists() {
marking_worklist_.FlushToGlobal(); marking_worklist_.FlushToGlobal();
write_barrier_worklist_.FlushToGlobal();
} }
ConcurrentMarkingVisitor::ConcurrentMarkingVisitor(ThreadState* state, ConcurrentMarkingVisitor::ConcurrentMarkingVisitor(ThreadState* state,
......
...@@ -191,7 +191,7 @@ class PLATFORM_EXPORT MarkingVisitor ...@@ -191,7 +191,7 @@ class PLATFORM_EXPORT MarkingVisitor
// allowed to be in construction. // allowed to be in construction.
void VisitMarkedHeader(HeapObjectHeader* header); void VisitMarkedHeader(HeapObjectHeader* header);
void FlushMarkingWorklist(); void FlushMarkingWorklists();
private: private:
// Exact version of the marking write barriers. // Exact version of the marking write barriers.
......
...@@ -1171,7 +1171,7 @@ void ThreadState::IncrementalMarkingStart(BlinkGC::GCReason reason) { ...@@ -1171,7 +1171,7 @@ void ThreadState::IncrementalMarkingStart(BlinkGC::GCReason reason) {
// No active concurrent markers yet, so it is safe to write to // No active concurrent markers yet, so it is safe to write to
// concurrently_marked_bytes_ without a lock. // concurrently_marked_bytes_ without a lock.
concurrently_marked_bytes_ = 0; concurrently_marked_bytes_ = 0;
current_gc_data_.visitor->FlushMarkingWorklist(); current_gc_data_.visitor->FlushMarkingWorklists();
// Check that the marking worklist has enough private segments for all // Check that the marking worklist has enough private segments for all
// concurrent marking tasks. // concurrent marking tasks.
const uint8_t max_concurrent_task_id = const uint8_t max_concurrent_task_id =
...@@ -1238,7 +1238,7 @@ void ThreadState::IncrementalMarkingStep(BlinkGC::StackState stack_state, ...@@ -1238,7 +1238,7 @@ void ThreadState::IncrementalMarkingStep(BlinkGC::StackState stack_state,
} }
bool ThreadState::ConcurrentMarkingStep() { bool ThreadState::ConcurrentMarkingStep() {
current_gc_data_.visitor->FlushMarkingWorklist(); current_gc_data_.visitor->FlushMarkingWorklists();
if (!Heap().GetMarkingWorklist()->IsGlobalPoolEmpty()) { if (!Heap().GetMarkingWorklist()->IsGlobalPoolEmpty()) {
ScheduleConcurrentMarking(); ScheduleConcurrentMarking();
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment