| Index: runtime/vm/stub_code_mips.cc
|
| diff --git a/runtime/vm/stub_code_mips.cc b/runtime/vm/stub_code_mips.cc
|
| index ed6a0f3745be69376659dae3e5901a1b85b5c5d9..380466116113329e3bd7ee31ec70eb174071f540 100644
|
| --- a/runtime/vm/stub_code_mips.cc
|
| +++ b/runtime/vm/stub_code_mips.cc
|
| @@ -677,6 +677,9 @@ void StubCode::GenerateAllocateArrayStub(Assembler* assembler) {
|
| // T0: Points to new space object.
|
| __ sw(T2, Address(T0, Scavenger::top_offset()));
|
| __ addiu(V0, V0, Immediate(kHeapObjectTag));
|
| + // T1: Size of allocation in bytes.
|
| + __ subu(T1, T2, V0);
|
| + __ BumpAllocationCount(Heap::kNew, kArrayCid, T1, T5);
|
|
|
| // V0: new object start as a tagged pointer.
|
| // A0: array element type.
|
| @@ -1079,6 +1082,7 @@ void StubCode::GenerateAllocateContextStub(Assembler* assembler) {
|
| // T3: next object start.
|
| __ sw(T3, Address(T5, 0));
|
| __ addiu(V0, V0, Immediate(kHeapObjectTag));
|
| + __ BumpAllocationCount(Heap::kNew, context_class.id(), T2, T5);
|
|
|
| // Calculate the size tag.
|
| // V0: new object.
|
| @@ -1361,6 +1365,7 @@ void StubCode::GenerateAllocationStubForClass(Assembler* assembler,
|
| // Set the type arguments in the new object.
|
| __ sw(T1, Address(T2, cls.type_arguments_field_offset()));
|
| }
|
| + __ BumpAllocationCount(Heap::kNew, cls.id(), T5);
|
| // Done allocating and initializing the instance.
|
| // T2: new object still missing its heap tag.
|
| __ Ret();
|
| @@ -1450,6 +1455,9 @@ void StubCode::GenerateAllocationStubForClosure(Assembler* assembler,
|
| // Successfully allocated the object, now update top to point to
|
| // next object start and initialize the object.
|
| __ sw(T3, Address(T5));
|
| + // T3: Size of allocation in bytes.
|
| + __ subu(T3, T3, T2);
|
| + __ BumpAllocationCount(Heap::kNew, cls.id(), T3, T5);
|
|
|
| // T2: new closure object.
|
| // T4: new context object (only if is_implicit_closure).
|
|
|