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

Unified Diff: runtime/vm/code_generator.cc

Issue 51653006: Track live instance and allocation counts for classes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 5de912a0928919942675ffef1c679bf933f8d9bb..e31f38362c253b6e6408d088872b2cf403168fb1 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -109,6 +109,8 @@ DEFINE_RUNTIME_ENTRY(AllocateArray, 2) {
// Return value: newly allocated object.
DEFINE_RUNTIME_ENTRY(AllocateObject, 3) {
const Class& cls = Class::CheckedHandle(arguments.ArgAt(0));
+ // Report allocate to heap class stats.
+ isolate->class_table()->AllocateClassNewSpace(cls.id(), cls.instance_size());
const Instance& instance = Instance::Handle(Instance::New(cls));
arguments.SetReturn(instance);
if (cls.NumTypeArguments() == 0) {

Powered by Google App Engine
This is Rietveld 408576698