Commit b2ef3777 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[heap] Remove ProcessMarkingWorklist

Bug: chromium:758570
Change-Id: Ia2bd72c1756fbc4062c62d975e25bb0ca209a6ad
Reviewed-on: https://chromium-review.googlesource.com/674465Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48089}
parent 7447fd53
......@@ -1798,7 +1798,7 @@ void MarkCompactCollector::MarkStringTable(
if (non_atomic_marking_state()->WhiteToBlack(string_table)) {
// Explicitly mark the prefix.
string_table->IteratePrefix(custom_root_body_visitor);
ProcessMarkingWorklist();
EmptyMarkingWorklist();
}
}
......@@ -1813,10 +1813,10 @@ void MarkCompactCollector::MarkRoots(RootVisitor* root_visitor,
ProcessTopOptimizedFrame(custom_root_body_visitor);
}
// Mark all objects reachable from the objects on the marking stack.
// Before: the marking stack contains zero or more heap object pointers.
// After: the marking stack is empty, and all objects reachable from the
// marking stack have been marked, or are overflowed in the heap.
// Mark all objects reachable from the objects on the marking work list.
// Before: the marking work list contains zero or more heap object pointers.
// After: the marking work list is empty, and all objects reachable from the
// marking work list have been marked.
void MarkCompactCollector::EmptyMarkingWorklist() {
HeapObject* object;
MarkCompactMarkingVisitor visitor(this);
......@@ -1833,15 +1833,6 @@ void MarkCompactCollector::EmptyMarkingWorklist() {
DCHECK(marking_worklist()->IsEmpty());
}
// Mark all objects reachable (transitively) from objects on the marking
// stack. Before: the marking stack contains zero or more heap object
// pointers. After: the marking stack is empty and there are no overflowed
// objects in the heap.
void MarkCompactCollector::ProcessMarkingWorklist() {
EmptyMarkingWorklist();
DCHECK(marking_worklist()->IsEmpty());
}
// Mark all objects reachable (transitively) from objects on the marking
// stack including references only considered in the atomic marking pause.
void MarkCompactCollector::ProcessEphemeralMarking(
......@@ -1867,7 +1858,7 @@ void MarkCompactCollector::ProcessEphemeralMarking(
}
ProcessWeakCollections();
work_to_do = !marking_worklist()->IsEmpty();
ProcessMarkingWorklist();
EmptyMarkingWorklist();
}
CHECK(marking_worklist()->IsEmpty());
CHECK_EQ(0, heap()->local_embedder_heap_tracer()->NumberOfWrappersToTrace());
......@@ -1884,7 +1875,7 @@ void MarkCompactCollector::ProcessTopOptimizedFrame(ObjectVisitor* visitor) {
if (!code->CanDeoptAt(it.frame()->pc())) {
Code::BodyDescriptor::IterateBody(code, visitor);
}
ProcessMarkingWorklist();
EmptyMarkingWorklist();
return;
}
}
......@@ -2322,7 +2313,7 @@ void MinorMarkCompactCollector::MarkLiveObjects() {
{
TRACE_GC(heap()->tracer(), GCTracer::Scope::MINOR_MC_MARK_WEAK);
heap()->IterateEncounteredWeakCollections(&root_visitor);
ProcessMarkingWorklist();
EmptyMarkingWorklist();
}
{
......@@ -2331,14 +2322,10 @@ void MinorMarkCompactCollector::MarkLiveObjects() {
&IsUnmarkedObjectForYoungGeneration);
isolate()->global_handles()->IterateNewSpaceWeakUnmodifiedRoots(
&root_visitor);
ProcessMarkingWorklist();
EmptyMarkingWorklist();
}
}
void MinorMarkCompactCollector::ProcessMarkingWorklist() {
EmptyMarkingWorklist();
}
void MinorMarkCompactCollector::EmptyMarkingWorklist() {
MarkingWorklist::View marking_worklist(worklist(), kMainMarker);
HeapObject* object = nullptr;
......@@ -2583,7 +2570,7 @@ void MarkCompactCollector::MarkLiveObjects() {
GCTracer::Scope::MC_MARK_WEAK_CLOSURE_WEAK_HANDLES);
heap()->isolate()->global_handles()->IdentifyWeakHandles(
&IsUnmarkedHeapObject);
ProcessMarkingWorklist();
EmptyMarkingWorklist();
}
// Then we mark the objects.
......@@ -2591,7 +2578,7 @@ void MarkCompactCollector::MarkLiveObjects() {
TRACE_GC(heap()->tracer(),
GCTracer::Scope::MC_MARK_WEAK_CLOSURE_WEAK_ROOTS);
heap()->isolate()->global_handles()->IterateWeakRoots(&root_visitor);
ProcessMarkingWorklist();
EmptyMarkingWorklist();
}
// Repeat Harmony weak maps marking to mark unmarked objects reachable from
......
......@@ -267,7 +267,6 @@ class MarkCompactCollectorBase {
// Mark objects reachable (transitively) from objects in the marking
// stack.
virtual void EmptyMarkingWorklist() = 0;
virtual void ProcessMarkingWorklist() = 0;
// Clear non-live references held in side data structures.
virtual void ClearNonLiveReferences() = 0;
virtual void EvacuatePrologue() = 0;
......@@ -389,7 +388,6 @@ class MinorMarkCompactCollector final : public MarkCompactCollectorBase {
void MarkLiveObjects() override;
void MarkRootSetInParallel();
void ProcessMarkingWorklist() override;
void EmptyMarkingWorklist() override;
void ClearNonLiveReferences() override;
......@@ -776,8 +774,6 @@ class MarkCompactCollector final : public MarkCompactCollectorBase {
// the string table are weak.
void MarkStringTable(ObjectVisitor* visitor);
void ProcessMarkingWorklist() override;
// Mark objects reachable (transitively) from objects in the marking stack
// or overflowed in the heap. This respects references only considered in
// the final atomic marking pause including the following:
......
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