[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/1166835 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#54962}
This commit is contained in:
parent
de80e94c9a
commit
efa7a97408
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user