| Index: src/arm/macro-assembler-arm.cc
|
| diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
|
| index 8e187a49f331ea25eb8881eb1b337473d425549a..9c5fd195f737c9f1df24c13c8699b30c85cdcb57 100644
|
| --- a/src/arm/macro-assembler-arm.cc
|
| +++ b/src/arm/macro-assembler-arm.cc
|
| @@ -1732,6 +1732,10 @@ void MacroAssembler::Allocate(int object_size,
|
| ldr(ip, MemOperand(topaddr, limit - top));
|
| }
|
|
|
| + if (isolate()->heap_profiler()->is_tracking_allocations()) {
|
| + RecordObjectAllocation(isolate(), result, object_size);
|
| + }
|
| +
|
| if ((flags & DOUBLE_ALIGNMENT) != 0) {
|
| // Align the next allocation. Storing the filler map without checking top is
|
| // safe in new-space because the limit of the heap is aligned there.
|
| @@ -1846,6 +1850,10 @@ void MacroAssembler::Allocate(Register object_size,
|
| ldr(ip, MemOperand(topaddr, limit - top));
|
| }
|
|
|
| + if (isolate()->heap_profiler()->is_tracking_allocations()) {
|
| + RecordObjectAllocation(isolate(), result, object_size);
|
| + }
|
| +
|
| if ((flags & DOUBLE_ALIGNMENT) != 0) {
|
| // Align the next allocation. Storing the filler map without checking top is
|
| // safe in new-space because the limit of the heap is aligned there.
|
| @@ -3995,6 +4003,42 @@ void CodePatcher::EmitCondition(Condition cond) {
|
| }
|
|
|
|
|
| +void MacroAssembler::RecordObjectAllocation(Isolate* isolate,
|
| + Register object,
|
| + Register object_size) {
|
| + FrameScope frame(this, StackFrame::EXIT);
|
| + PushSafepointRegisters();
|
| + PrepareCallCFunction(3, r0);
|
| + mov(r0, Operand(ExternalReference::isolate_address(isolate)));
|
| + if (!object.is(r1)) {
|
| + mov(r1, object);
|
| + }
|
| + if (!object_size.is(r2)) {
|
| + mov(r2, object_size);
|
| + }
|
| + CallCFunction(
|
| + ExternalReference::record_object_allocation_function(isolate), 3);
|
| + PopSafepointRegisters();
|
| +}
|
| +
|
| +
|
| +void MacroAssembler::RecordObjectAllocation(Isolate* isolate,
|
| + Register object,
|
| + int object_size) {
|
| + FrameScope frame(this, StackFrame::EXIT);
|
| + PushSafepointRegisters();
|
| + PrepareCallCFunction(3, r0);
|
| + mov(r0, Operand(ExternalReference::isolate_address(isolate)));
|
| + if (!object.is(r1)) {
|
| + mov(r1, object);
|
| + }
|
| + mov(r2, Operand(object_size));
|
| + CallCFunction(
|
| + ExternalReference::record_object_allocation_function(isolate), 3);
|
| + PopSafepointRegisters();
|
| +}
|
| +
|
| +
|
| } } // namespace v8::internal
|
|
|
| #endif // V8_TARGET_ARCH_ARM
|
|
|