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

[heap] Introduce phase for marking wrappers

Introduces a phase for marking wrappers in the atomic pause. The phase
is opportunistic in a sense that it may no catch all wrappers. E.g.
there may be wrappers discovered only after processing ephemerons.

Bug: chromium:843903
Change-Id: Ic55fdcb37e3ff44156e4eca4c1c95919fc3fcd1d
Reviewed-on: https://chromium-review.googlesource.com/1166835Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54962}
parent de80e94c
......@@ -351,6 +351,7 @@
F(MC_MARK_WEAK_CLOSURE_WEAK_HANDLES) \
F(MC_MARK_WEAK_CLOSURE_WEAK_ROOTS) \
F(MC_MARK_WEAK_CLOSURE_HARMONY) \
F(MC_MARK_WRAPPERS) \
F(MC_MARK_WRAPPER_EPILOGUE) \
F(MC_MARK_WRAPPER_PROLOGUE) \
F(MC_MARK_WRAPPER_TRACING) \
......
......@@ -1784,6 +1784,18 @@ void MarkCompactCollector::MarkLiveObjects() {
DCHECK(marking_worklist()->IsEmpty());
// Mark objects reachable through the embedder heap. This phase is
// opportunistic as it may not discover graphs that are only reachable
// through ephemerons.
{
TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_WRAPPERS);
while (!heap_->local_embedder_heap_tracer()->IsRemoteTracingDone()) {
PerformWrapperTracing();
ProcessMarkingWorklist();
}
DCHECK(marking_worklist()->IsEmpty());
}
// The objects reachable from the roots are marked, yet unreachable objects
// are unmarked. Mark objects reachable due to embedder heap tracing or
// harmony weak maps.
......
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