Index: runtime/vm/heap.cc |
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc |
index e66d6db7a469300849aafe6d946fa8fa60b19870..5c8b21a351389516021bf3420c7e695146787a36 100644 |
--- a/runtime/vm/heap.cc |
+++ b/runtime/vm/heap.cc |
@@ -680,7 +680,7 @@ void Heap::RecordAfterGC() { |
stats_.after_.old_ = old_space_->GetCurrentUsage(); |
ASSERT(gc_in_progress_); |
gc_in_progress_ = false; |
- if (Service::NeedsGCEvents()) { |
+ if (Service::gc_stream.enabled()) { |
ServiceEvent event(Isolate::Current(), ServiceEvent::kGC); |
event.set_gc_stats(&stats_); |
Service::HandleEvent(&event); |