Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 01c76904e73acdc67bd65bd24bd03f0b4adf32fa..0ec3e1bd643193b9566f81be591f76e6bd845776 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -1459,6 +1459,11 @@ RawObject* Object::Allocate(intptr_t cls_id, |
Exceptions::Throw(exception); |
UNREACHABLE(); |
} |
+ if (space == Heap::kNew) { |
+ isolate->class_table()->ReportAllocationNew(cls_id, size); |
+ } else { |
+ isolate->class_table()->ReportAllocationOld(cls_id, size); |
+ } |
NoGCScope no_gc; |
InitializeObject(address, cls_id, size); |
RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag); |