| Index: src/heap/mark-compact.cc
|
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
|
| index affe13d873e0f403895ce4f39647e64a622b5035..cadb68834b4181892353bebc03a2d79119d4f71f 100644
|
| --- a/src/heap/mark-compact.cc
|
| +++ b/src/heap/mark-compact.cc
|
| @@ -2142,7 +2142,12 @@ void MarkCompactCollector::MarkLiveObjects() {
|
| // The objects reachable from the roots are marked, yet unreachable
|
| // objects are unmarked. Mark objects reachable due to host
|
| // application specific logic or through Harmony weak maps.
|
| - ProcessEphemeralMarking(&root_visitor, false);
|
| + {
|
| + GCTracer::Scope gc_scope(heap()->tracer(),
|
| + GCTracer::Scope::MC_MARK_WEAK_CLOSURE_EPHEMERAL);
|
| + ProcessEphemeralMarking(&root_visitor, false);
|
| + ProcessMarkingDeque();
|
| + }
|
|
|
| // The objects reachable from the roots, weak maps or object groups
|
| // are marked. Objects pointed to only by weak global handles cannot be
|
| @@ -2151,18 +2156,33 @@ void MarkCompactCollector::MarkLiveObjects() {
|
| //
|
| // First we identify nonlive weak handles and mark them as pending
|
| // destruction.
|
| - heap()->isolate()->global_handles()->IdentifyWeakHandles(
|
| - &IsUnmarkedHeapObject);
|
| + {
|
| + GCTracer::Scope gc_scope(
|
| + heap()->tracer(), GCTracer::Scope::MC_MARK_WEAK_CLOSURE_WEAK_HANDLES);
|
| + heap()->isolate()->global_handles()->IdentifyWeakHandles(
|
| + &IsUnmarkedHeapObject);
|
| + ProcessMarkingDeque();
|
| + }
|
| // Then we mark the objects.
|
| - heap()->isolate()->global_handles()->IterateWeakRoots(&root_visitor);
|
| - ProcessMarkingDeque();
|
| +
|
| + {
|
| + GCTracer::Scope gc_scope(
|
| + heap()->tracer(), GCTracer::Scope::MC_MARK_WEAK_CLOSURE_WEAK_ROOTS);
|
| + heap()->isolate()->global_handles()->IterateWeakRoots(&root_visitor);
|
| + ProcessMarkingDeque();
|
| + }
|
|
|
| // Repeat Harmony weak maps marking to mark unmarked objects reachable from
|
| // the weak roots we just marked as pending destruction.
|
| //
|
| // We only process harmony collections, as all object groups have been fully
|
| // processed and no weakly reachable node can discover new objects groups.
|
| - ProcessEphemeralMarking(&root_visitor, true);
|
| + {
|
| + GCTracer::Scope gc_scope(heap()->tracer(),
|
| + GCTracer::Scope::MC_MARK_WEAK_CLOSURE_HARMONY);
|
| + ProcessEphemeralMarking(&root_visitor, true);
|
| + ProcessMarkingDeque();
|
| + }
|
| }
|
|
|
| if (FLAG_print_cumulative_gc_stat) {
|
|
|