Index: runtime/vm/heap.cc |
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc |
index 4f79057d755ecdba3903fcb5dd1d3a35b92ff592..39aed9cb8c223038906b47d564f531e5eb34fb6a 100644 |
--- a/runtime/vm/heap.cc |
+++ b/runtime/vm/heap.cc |
@@ -760,7 +760,7 @@ void Heap::RecordAfterGC(Space space) { |
stats_.after_.old_ = old_space_.GetCurrentUsage(); |
ASSERT((space == kNew && gc_new_space_in_progress_) || |
(space == kOld && gc_old_space_in_progress_)); |
- if (Service::gc_stream.enabled()) { |
+ if (FLAG_support_service && Service::gc_stream.enabled()) { |
ServiceEvent event(Isolate::Current(), ServiceEvent::kGC); |
event.set_gc_stats(&stats_); |
Service::HandleEvent(&event); |