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

Unified Diff: runtime/vm/object.cc

Issue 345543003: Send allocation stats with each class and show in class view. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 months 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/object.cc
===================================================================
--- runtime/vm/object.cc (revision 37499)
+++ runtime/vm/object.cc (working copy)
@@ -4063,6 +4063,14 @@
jsobj.AddPropertyF("name", "canonical types of %s", internal_class_name);
jsobj.AddPropertyF("user_name", "canonical types of %s", pretty_class_name);
}
+ {
+ ClassTable* class_table = Isolate::Current()->class_table();
+ const ClassHeapStats* stats = class_table->StatsWithUpdatedSize(id());
+ if (stats != NULL) {
+ JSONObject allocation_stats(&jsobj, "allocation_stats");
Cutch 2014/06/20 18:10:49 new service fields use dartCamelCase
koda 2014/06/20 18:37:04 Done.
+ stats->PrintToJSONObject(*this, &allocation_stats);
+ }
+ }
}

Powered by Google App Engine
This is Rietveld 408576698