Index: runtime/vm/heap.cc |
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc |
index 6120f0c2fccb3f732a66c8978aa18111a6dcc13c..3353819575fe3c709a3d9ad7f1417bb524752f40 100644 |
--- a/runtime/vm/heap.cc |
+++ b/runtime/vm/heap.cc |
@@ -367,11 +367,7 @@ void Heap::CollectNewSpaceGarbage(Thread* thread, |
bool invoke_api_callbacks = (api_callbacks == kInvokeApiCallbacks); |
RecordBeforeGC(kNew, reason); |
VMTagScope tagScope(thread, VMTag::kGCNewSpaceTagId); |
-#ifndef PRODUCT |
- TimelineDurationScope tds(thread, |
- Timeline::GetGCStream(), |
- "CollectNewGeneration"); |
-#endif // !PRODUCT |
+ TIMELINE_FUNCTION_GC_DURATION(thread, "CollectNewGeneration"); |
UpdateClassHeapStatsBeforeGC(kNew); |
new_space_.Scavenge(invoke_api_callbacks); |
isolate()->class_table()->UpdatePromoted(); |
@@ -394,11 +390,7 @@ void Heap::CollectOldSpaceGarbage(Thread* thread, |
bool invoke_api_callbacks = (api_callbacks == kInvokeApiCallbacks); |
RecordBeforeGC(kOld, reason); |
VMTagScope tagScope(thread, VMTag::kGCOldSpaceTagId); |
-#ifndef PRODUCT |
- TimelineDurationScope tds(thread, |
- Timeline::GetGCStream(), |
- "CollectOldGeneration"); |
-#endif // !PRODUCT |
+ TIMELINE_FUNCTION_GC_DURATION(thread, "CollectOldGeneration"); |
UpdateClassHeapStatsBeforeGC(kOld); |
old_space_.MarkSweep(invoke_api_callbacks); |
RecordAfterGC(kOld); |