Index: runtime/vm/intrinsifier_x64.cc |
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc |
index 2a2fb164e0a05f888e3b5bf784d0b26b15a08b96..daaf9492effe5b8632c0a025ea7ad83730dc60da 100644 |
--- a/runtime/vm/intrinsifier_x64.cc |
+++ b/runtime/vm/intrinsifier_x64.cc |
@@ -78,7 +78,7 @@ void Intrinsifier::List_Allocate(Assembler* assembler) { |
__ movq(R13, Immediate(heap->TopAddress())); |
__ movq(Address(R13, 0), RCX); |
__ addq(RAX, Immediate(kHeapObjectTag)); |
- |
+ __ BumpAllocationCount(Heap::kNew, kArrayCid, RDI); |
// Initialize the tags. |
// RAX: new object start as a tagged pointer. |
// RDI: allocation size. |
@@ -259,6 +259,7 @@ void Intrinsifier::GrowableList_Allocate(Assembler* assembler) { |
// Set the length field in the growable array object to 0. |
__ movq(FieldAddress(RAX, GrowableObjectArray::length_offset()), |
Immediate(0)); |
+ __ BumpAllocationCount(Heap::kNew, kGrowableObjectArrayCid); |
__ ret(); // returns the newly allocated object in RAX. |
__ Bind(&fall_through); |
@@ -446,7 +447,7 @@ void Intrinsifier::GrowableList_add(Assembler* assembler) { |
__ movq(R13, Immediate(heap->TopAddress())); \ |
__ movq(Address(R13, 0), RCX); \ |
__ addq(RAX, Immediate(kHeapObjectTag)); \ |
- \ |
+ __ BumpAllocationCount(Heap::kNew, cid, RDI); \ |
/* Initialize the tags. */ \ |
/* RAX: new object start as a tagged pointer. */ \ |
/* RCX: new object end address. */ \ |
@@ -490,7 +491,6 @@ void Intrinsifier::GrowableList_add(Assembler* assembler) { |
__ addq(RDI, Immediate(kWordSize)); \ |
__ jmp(&init_loop, Assembler::kNearJump); \ |
__ Bind(&done); \ |
- \ |
__ ret(); \ |
__ Bind(&fall_through); \ |
@@ -1524,6 +1524,7 @@ static void TryAllocateOnebyteString(Assembler* assembler, |
__ movq(R13, Immediate(heap->TopAddress())); |
__ movq(Address(R13, 0), RCX); |
__ addq(RAX, Immediate(kHeapObjectTag)); |
+ __ BumpAllocationCount(Heap::kNew, kOneByteStringCid, RDI); |
// Initialize the tags. |
// RAX: new object start as a tagged pointer. |