Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: runtime/vm/zone.cc

Issue 2554983002: Created methods to surface zone memory information for each isolate and thread in JSON. (Closed)
Patch Set: Created methods to surface zone memory information for each isolate and thread in JSON. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/zone.h ('k') | runtime/vm/zone_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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",
« no previous file with comments | « runtime/vm/zone.h ('k') | runtime/vm/zone_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698