Chromium Code Reviews| Index: runtime/vm/zone.cc |
| diff --git a/runtime/vm/zone.cc b/runtime/vm/zone.cc |
| index 45314dcfe32d7887d91f82978eaecdfa50cdbce5..1103d56bfadc2cb16c12255bbbab162edfc90598 100644 |
| --- a/runtime/vm/zone.cc |
| +++ b/runtime/vm/zone.cc |
| @@ -260,6 +260,15 @@ char* Zone::VPrint(const char* format, va_list args) { |
| } |
| +#ifndef PRODUCT |
| +void Zone::PrintToJSONObject(JSONObject* obj) const { |
| + const Zone* zone = this; |
| + intptr_t size = SizeInBytes(); |
| + obj->AddPropertyF("address", "0x%" Px "", reinterpret_cast<uword>(zone)); |
|
Cutch
2016/12/06 19:11:15
don't forget "type" and "id" fields.
|
| + obj->AddProperty("size", 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", |