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

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
Index: runtime/vm/zone.cc
diff --git a/runtime/vm/zone.cc b/runtime/vm/zone.cc
index 45314dcfe32d7887d91f82978eaecdfa50cdbce5..10dab8ef58ac1e563d0de429f6cd4b6b603e9bd2 100644
--- a/runtime/vm/zone.cc
+++ b/runtime/vm/zone.cc
@@ -260,6 +260,17 @@ char* Zone::VPrint(const char* format, va_list args) {
}
+#if defined(DEBUG)
zra 2016/12/08 18:54:13 ditto
bkonyi 2016/12/08 20:58:32 Done.
+void Zone::PrintJSON(JSONStream* stream, bool ref) 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
+
zra 2016/12/08 18:54:14 two newlines between functions.
bkonyi 2016/12/08 20:58:32 Done.
StackZone::StackZone(Thread* thread) : StackResource(thread), zone_() {
if (FLAG_trace_zones) {
OS::PrintErr("*** Starting a new Stack zone 0x%" Px "(0x%" Px ")\n",

Powered by Google App Engine
This is Rietveld 408576698