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

Unified Diff: runtime/vm/object.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/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index f1f2289b6119e85f7f598c850b9010ba5f3dc39e..952fe443d63cba5bf04146767c5670cb2a5e322c 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -1446,6 +1446,11 @@ RawObject* Object::Allocate(intptr_t cls_id,
Exceptions::Throw(exception);
UNREACHABLE();
}
+ if (space == Heap::kNew) {
+ isolate->class_table()->ReportAllocationNewSpace(cls_id, size);
Ivan Posva 2013/12/12 13:53:24 This separation should probably be done in the cla
Cutch 2013/12/13 01:31:09 Agreed, but, #including heap.h into class_table.h
+ } else {
+ isolate->class_table()->ReportAllocationOldSpace(cls_id, size);
+ }
NoGCScope no_gc;
InitializeObject(address, cls_id, size);
RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag);

Powered by Google App Engine
This is Rietveld 408576698