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

Unified Diff: runtime/vm/gc_marker.cc

Issue 2010673002: Add timeline event for weak handle processing. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | runtime/vm/scavenger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/gc_marker.cc
diff --git a/runtime/vm/gc_marker.cc b/runtime/vm/gc_marker.cc
index 93c9e7cff8be847fc204568d2694826dc9e61498..069f34175990a492b4c75280f2062e1e58ad0153 100644
--- a/runtime/vm/gc_marker.cc
+++ b/runtime/vm/gc_marker.cc
@@ -652,7 +652,8 @@ void GCMarker::MarkObjects(Isolate* isolate,
// The API prologue/epilogue may create/destroy zones, so we must not
// depend on zone allocations surviving beyond the epilogue callback.
{
- StackZone stack_zone(Thread::Current());
+ Thread* thread = Thread::Current();
+ StackZone stack_zone(thread);
Zone* zone = stack_zone.GetZone();
MarkingStack marking_stack;
marked_bytes_ = 0;
@@ -665,8 +666,11 @@ void GCMarker::MarkObjects(Isolate* isolate,
skipped_code_functions);
IterateRoots(isolate, &mark, 0, 1);
mark.DrainMarkingStack();
- MarkingWeakVisitor mark_weak;
- IterateWeakRoots(isolate, &mark_weak);
+ {
+ TIMELINE_FUNCTION_GC_DURATION(thread, "WeakHandleProcessing");
+ MarkingWeakVisitor mark_weak;
+ IterateWeakRoots(isolate, &mark_weak);
+ }
// All marking done; detach code, etc.
FinalizeResultsFrom(&mark);
} else {
@@ -687,8 +691,11 @@ void GCMarker::MarkObjects(Isolate* isolate,
barrier.Sync();
// Phase 2: Weak processing on main thread.
- MarkingWeakVisitor mark_weak;
- IterateWeakRoots(isolate, &mark_weak);
+ {
+ TIMELINE_FUNCTION_GC_DURATION(thread, "WeakHandleProcessing");
+ MarkingWeakVisitor mark_weak;
+ IterateWeakRoots(isolate, &mark_weak);
+ }
barrier.Sync();
// Phase 3: Finalize results from all markers (detach code, etc.).
« no previous file with comments | « no previous file | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698