Chromium Code Reviews| Index: src/x64/macro-assembler-x64.cc |
| diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
| index 075f07cc353e991fd7969a49725599cb5fcfd45b..a56423121baef2951de63e6f15332374f8e69b2a 100644 |
| --- a/src/x64/macro-assembler-x64.cc |
| +++ b/src/x64/macro-assembler-x64.cc |
| @@ -4090,7 +4090,11 @@ void MacroAssembler::Allocate(int object_size, |
| LoadAllocationTopHelper(result, scratch, flags); |
| if (isolate()->heap_profiler()->is_tracking_allocations()) { |
| - RecordObjectAllocation(isolate(), result, object_size); |
| + push(Immediate(object_size)); |
|
loislo
2013/11/05 08:58:42
please add AllowStubCallsScope allow_scope(this,
yurys
2013/11/05 09:09:13
Done.
|
| + push(result); |
| + RecordObjectAllocationStub stub; |
| + CallStub(&stub); |
| + addq(rsp, Immediate(2 * kPointerSize)); |
|
Yang
2013/10/30 15:01:25
Use Drop(2) instead.
yurys
2013/10/31 08:57:41
Done.
|
| } |
| // Align the next allocation. Storing the filler map without checking top is |
| @@ -4173,7 +4177,11 @@ void MacroAssembler::Allocate(Register object_size, |
| LoadAllocationTopHelper(result, scratch, flags); |
| if (isolate()->heap_profiler()->is_tracking_allocations()) { |
| - RecordObjectAllocation(isolate(), result, object_size); |
| + push(object_size); |
| + push(result); |
| + RecordObjectAllocationStub stub; |
| + CallStub(&stub); |
| + addq(rsp, Immediate(2 * kRegisterSize)); |
| } |
| // Align the next allocation. Storing the filler map without checking top is |
| @@ -4936,38 +4944,6 @@ void MacroAssembler::TestJSArrayForAllocationMemento( |
| } |
| -void MacroAssembler::RecordObjectAllocation(Isolate* isolate, |
| - Register object, |
| - Register object_size) { |
| - FrameScope frame(this, StackFrame::EXIT); |
| - PushSafepointRegisters(); |
| - PrepareCallCFunction(3); |
| - // In case object is rdx |
| - movq(kScratchRegister, object); |
| - movq(arg_reg_3, object_size); |
| - movq(arg_reg_2, kScratchRegister); |
| - movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE); |
| - 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); |
| - movq(arg_reg_2, object); |
| - movq(arg_reg_3, Immediate(object_size)); |
| - movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE); |
| - CallCFunction( |
| - ExternalReference::record_object_allocation_function(isolate), 3); |
| - PopSafepointRegisters(); |
| -} |
| - |
| - |
| } } // namespace v8::internal |
| #endif // V8_TARGET_ARCH_X64 |