Chromium Code Reviews| Index: src/heap/mark-compact.cc |
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
| index 51a650a09930bd70af2d196beebe1e6b97abcc37..047db79dbe2c879fe19274a20f59deccf3b78440 100644 |
| --- a/src/heap/mark-compact.cc |
| +++ b/src/heap/mark-compact.cc |
| @@ -2220,31 +2220,34 @@ void MarkCompactCollector::MarkLiveObjects() { |
| RootMarkingVisitor root_visitor(heap()); |
| MarkRoots(&root_visitor); |
| - ProcessTopOptimizedFrame(&root_visitor); |
| - |
| - // 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); |
| - |
| - // The objects reachable from the roots, weak maps or object groups |
| - // are marked. Objects pointed to only by weak global handles cannot be |
| - // immediately reclaimed. Instead, we have to mark them as pending and mark |
| - // objects reachable from them. |
| - // |
| - // First we identify nonlive weak handles and mark them as pending |
| - // destruction. |
| - heap()->isolate()->global_handles()->IdentifyWeakHandles( |
| - &IsUnmarkedHeapObject); |
| - // Then we mark the objects. |
| - heap()->isolate()->global_handles()->IterateWeakRoots(&root_visitor); |
| - |
| - // 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_WEAKCLOSURE); |
| + ProcessTopOptimizedFrame(&root_visitor); |
|
Hannes Payer (out of office)
2014/12/02 14:22:09
I guess you want to start measuring time after Pro
|
| + |
| + // 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); |
| + |
| + // The objects reachable from the roots, weak maps or object groups |
| + // are marked. Objects pointed to only by weak global handles cannot be |
| + // immediately reclaimed. Instead, we have to mark them as pending and mark |
| + // objects reachable from them. |
| + // |
| + // First we identify nonlive weak handles and mark them as pending |
| + // destruction. |
| + heap()->isolate()->global_handles()->IdentifyWeakHandles( |
| + &IsUnmarkedHeapObject); |
| + // Then we mark the objects. |
| + heap()->isolate()->global_handles()->IterateWeakRoots(&root_visitor); |
| + |
| + // 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); |
| + } |
| AfterMarking(); |