Index: runtime/vm/metrics.cc |
diff --git a/runtime/vm/metrics.cc b/runtime/vm/metrics.cc |
index 0e15c0fb84f38ab9ed8dc3fc26ee7282ba69c0a5..cb6c2055217070efbcbff0918f9844cdfd9cf109 100644 |
--- a/runtime/vm/metrics.cc |
+++ b/runtime/vm/metrics.cc |
@@ -80,6 +80,9 @@ static const char* UnitString(intptr_t unit) { |
void Metric::PrintJSON(JSONStream* stream) { |
+ if (!FLAG_support_service) { |
+ return; |
+ } |
JSONObject obj(stream); |
obj.AddProperty("type", "Counter"); |
obj.AddProperty("name", name_); |