Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Unified Diff: src/heap/mark-compact.cc

Issue 1836013004: [heap] Added fine grained timers to MC_MARK_WEAK_CLOSURE. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | tools/eval_gc_time.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | tools/eval_gc_time.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698