Index: runtime/vm/zone.cc |
diff --git a/runtime/vm/zone.cc b/runtime/vm/zone.cc |
index 45314dcfe32d7887d91f82978eaecdfa50cdbce5..2632f3a3e5436f8a19b6522880d09741a4fffaec 100644 |
--- a/runtime/vm/zone.cc |
+++ b/runtime/vm/zone.cc |
@@ -260,6 +260,18 @@ char* Zone::VPrint(const char* format, va_list args) { |
} |
+#ifndef PRODUCT |
+void Zone::PrintJSON(JSONStream* stream) const { |
+ JSONObject jsobj(stream); |
+ intptr_t capacity = SizeInBytes(); |
+ intptr_t used_size = UsedSizeInBytes(); |
+ jsobj.AddProperty("type", "_Zone"); |
+ jsobj.AddProperty("capacity", capacity); |
+ jsobj.AddProperty("used", used_size); |
+} |
+#endif |
+ |
+ |
StackZone::StackZone(Thread* thread) : StackResource(thread), zone_() { |
if (FLAG_trace_zones) { |
OS::PrintErr("*** Starting a new Stack zone 0x%" Px "(0x%" Px ")\n", |