Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Side by Side Diff: runtime/vm/assembler_x64.cc

Issue 1226143011: Trace allocation of arrays (Closed) Base URL: git@github.com:dart-lang/sdk.git@try_allocate_realz
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/assembler_mips.cc ('k') | runtime/vm/profiler_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 3585 matching lines...) Expand 10 before | Expand all | Expand 10 after
3596 3596
3597 3597
3598 void Assembler::TryAllocateArray(intptr_t cid, 3598 void Assembler::TryAllocateArray(intptr_t cid,
3599 intptr_t instance_size, 3599 intptr_t instance_size,
3600 Label* failure, 3600 Label* failure,
3601 bool near_jump, 3601 bool near_jump,
3602 Register instance, 3602 Register instance,
3603 Register end_address) { 3603 Register end_address) {
3604 ASSERT(failure != NULL); 3604 ASSERT(failure != NULL);
3605 if (FLAG_inline_alloc) { 3605 if (FLAG_inline_alloc) {
3606 // If this allocation is traced, program will jump to failure path
3607 // (i.e. the allocation stub) which will allocate the object and trace the
3608 // allocation call site.
3609 MaybeTraceAllocation(cid, failure, near_jump);
3606 Isolate* isolate = Isolate::Current(); 3610 Isolate* isolate = Isolate::Current();
3607 Heap* heap = isolate->heap(); 3611 Heap* heap = isolate->heap();
3608 Heap::Space space = heap->SpaceForAllocation(cid); 3612 Heap::Space space = heap->SpaceForAllocation(cid);
3609 movq(instance, Immediate(heap->TopAddress(space))); 3613 movq(instance, Immediate(heap->TopAddress(space)));
3610 movq(instance, Address(instance, 0)); 3614 movq(instance, Address(instance, 0));
3611 movq(end_address, RAX); 3615 movq(end_address, RAX);
3612 3616
3613 addq(end_address, Immediate(instance_size)); 3617 addq(end_address, Immediate(instance_size));
3614 j(CARRY, failure); 3618 j(CARRY, failure);
3615 3619
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
3963 3967
3964 3968
3965 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3969 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3966 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 3970 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
3967 return xmm_reg_names[reg]; 3971 return xmm_reg_names[reg];
3968 } 3972 }
3969 3973
3970 } // namespace dart 3974 } // namespace dart
3971 3975
3972 #endif // defined TARGET_ARCH_X64 3976 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_mips.cc ('k') | runtime/vm/profiler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698