| Index: src/x64/macro-assembler-x64.cc
|
| diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
|
| index 9e8568c2de5b260edfd23c53c33f599a2792b857..df984fcaf075e67e964b4e1cdd0c68a135d7dcb9 100644
|
| --- a/src/x64/macro-assembler-x64.cc
|
| +++ b/src/x64/macro-assembler-x64.cc
|
| @@ -4081,7 +4081,10 @@ void MacroAssembler::Allocate(int object_size,
|
| AllocationFlags flags) {
|
| ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0);
|
| ASSERT(object_size <= Page::kMaxNonCodeHeapObjectSize);
|
| - if (!FLAG_inline_new) {
|
| + if (!FLAG_inline_new ||
|
| + // TODO(mstarzinger): Implement more efficiently by keeping then
|
| + // bump-pointer allocation area empty instead of recompiling code.
|
| + isolate()->heap_profiler()->is_tracking_allocations()) {
|
| if (emit_debug_code()) {
|
| // Trash the registers to simulate an allocation failure.
|
| movl(result, Immediate(0x7091));
|
| @@ -4100,10 +4103,6 @@ void MacroAssembler::Allocate(int object_size,
|
| // Load address of new object into result.
|
| LoadAllocationTopHelper(result, scratch, flags);
|
|
|
| - if (isolate()->heap_profiler()->is_tracking_allocations()) {
|
| - RecordObjectAllocation(isolate(), result, object_size);
|
| - }
|
| -
|
| // 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.
|
| if (((flags & DOUBLE_ALIGNMENT) != 0) && FLAG_debug_code) {
|
| @@ -4165,7 +4164,10 @@ void MacroAssembler::Allocate(Register object_size,
|
| Label* gc_required,
|
| AllocationFlags flags) {
|
| ASSERT((flags & SIZE_IN_WORDS) == 0);
|
| - if (!FLAG_inline_new) {
|
| + if (!FLAG_inline_new ||
|
| + // TODO(mstarzinger): Implement more efficiently by keeping then
|
| + // bump-pointer allocation area empty instead of recompiling code.
|
| + isolate()->heap_profiler()->is_tracking_allocations()) {
|
| if (emit_debug_code()) {
|
| // Trash the registers to simulate an allocation failure.
|
| movl(result, Immediate(0x7091));
|
| @@ -4183,10 +4185,6 @@ void MacroAssembler::Allocate(Register object_size,
|
| // Load address of new object into result.
|
| LoadAllocationTopHelper(result, scratch, flags);
|
|
|
| - if (isolate()->heap_profiler()->is_tracking_allocations()) {
|
| - RecordObjectAllocation(isolate(), result, object_size);
|
| - }
|
| -
|
| // 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.
|
| if (((flags & DOUBLE_ALIGNMENT) != 0) && FLAG_debug_code) {
|
| @@ -4947,38 +4945,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();
|
| -}
|
| -
|
| -
|
| void MacroAssembler::JumpIfDictionaryInPrototypeChain(
|
| Register object,
|
| Register scratch0,
|
|
|