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

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
« no previous file with comments | « runtime/vm/heap_test.cc ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, "allocationStats");
+ stats->PrintToJSONObject(*this, &allocation_stats);
+ }
+ }
}
« no previous file with comments | « runtime/vm/heap_test.cc ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698