[heap] Added fine grained timers to MC_MARK_WEAK_CLOSURE.
BUG= Review URL: https://codereview.chromium.org/1836013004 Cr-Commit-Position: refs/heads/master@{#35107}
This commit is contained in:
parent
27df7757e5
commit
3b1578db0c
@ -559,6 +559,10 @@ void GCTracer::PrintNVP() const {
|
||||
"mark.prepare_code_flush=%.1f "
|
||||
"mark.roots=%.1f "
|
||||
"mark.weak_closure=%.1f "
|
||||
"mark.weak_closure.ephemeral=%.1f "
|
||||
"mark.weak_closure.weak_handles=%.1f "
|
||||
"mark.weak_closure.weak_roots=%.1f "
|
||||
"mark.weak_closure.harmony=%.1f "
|
||||
"sweep=%.1f "
|
||||
"sweep.code=%.1f "
|
||||
"sweep.map=%.1f "
|
||||
@ -628,6 +632,10 @@ void GCTracer::PrintNVP() const {
|
||||
current_.scopes[Scope::MC_MARK_PREPARE_CODE_FLUSH],
|
||||
current_.scopes[Scope::MC_MARK_ROOTS],
|
||||
current_.scopes[Scope::MC_MARK_WEAK_CLOSURE],
|
||||
current_.scopes[Scope::MC_MARK_WEAK_CLOSURE_EPHEMERAL],
|
||||
current_.scopes[Scope::MC_MARK_WEAK_CLOSURE_WEAK_HANDLES],
|
||||
current_.scopes[Scope::MC_MARK_WEAK_CLOSURE_WEAK_ROOTS],
|
||||
current_.scopes[Scope::MC_MARK_WEAK_CLOSURE_HARMONY],
|
||||
current_.scopes[Scope::MC_SWEEP],
|
||||
current_.scopes[Scope::MC_SWEEP_CODE],
|
||||
current_.scopes[Scope::MC_SWEEP_MAP],
|
||||
|
@ -98,6 +98,10 @@ class GCTracer {
|
||||
MC_MARK_PREPARE_CODE_FLUSH,
|
||||
MC_MARK_ROOTS,
|
||||
MC_MARK_WEAK_CLOSURE,
|
||||
MC_MARK_WEAK_CLOSURE_EPHEMERAL,
|
||||
MC_MARK_WEAK_CLOSURE_WEAK_HANDLES,
|
||||
MC_MARK_WEAK_CLOSURE_WEAK_ROOTS,
|
||||
MC_MARK_WEAK_CLOSURE_HARMONY,
|
||||
MC_SWEEP,
|
||||
MC_SWEEP_CODE,
|
||||
MC_SWEEP_MAP,
|
||||
|
@ -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) {
|
||||
|
@ -90,6 +90,10 @@ INTERESTING_OLD_GEN_KEYS="\
|
||||
mark.prepare_code_flush \
|
||||
mark.roots \
|
||||
mark.weak_closure \
|
||||
mark.weak_closure.ephemeral \
|
||||
mark.weak_closure.weak_handles \
|
||||
mark.weak_closure.weak_roots \
|
||||
mark.weak_closure.harmony \
|
||||
sweep \
|
||||
sweep.code \
|
||||
sweep.map \
|
||||
|
Loading…
Reference in New Issue
Block a user