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

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

Issue 1213013002: Update Assembler::TryAllocate to support inline allocation tracing (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
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/assembler_x64.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 #ifndef VM_ASSEMBLER_X64_H_ 5 #ifndef VM_ASSEMBLER_X64_H_
6 #define VM_ASSEMBLER_X64_H_ 6 #define VM_ASSEMBLER_X64_H_
7 7
8 #ifndef VM_ASSEMBLER_H_ 8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_x64.h directly; use assembler.h instead. 9 #error Do not include assembler_x64.h directly; use assembler.h instead.
10 #endif 10 #endif
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 void UpdateAllocationStats(intptr_t cid, 987 void UpdateAllocationStats(intptr_t cid,
988 Heap::Space space); 988 Heap::Space space);
989 989
990 void UpdateAllocationStatsWithSize(intptr_t cid, 990 void UpdateAllocationStatsWithSize(intptr_t cid,
991 Register size_reg, 991 Register size_reg,
992 Heap::Space space); 992 Heap::Space space);
993 void UpdateAllocationStatsWithSize(intptr_t cid, 993 void UpdateAllocationStatsWithSize(intptr_t cid,
994 intptr_t instance_size, 994 intptr_t instance_size,
995 Heap::Space space); 995 Heap::Space space);
996 996
997 // If allocation tracing for |cid| is enabled, will jump to |trace| label,
998 // which will allocate in the runtime where tracing occurs.
999 void MaybeTraceAllocation(intptr_t cid,
1000 Label* trace,
1001 bool near_jump);
1002
997 // Inlined allocation of an instance of class 'cls', code has no runtime 1003 // Inlined allocation of an instance of class 'cls', code has no runtime
998 // calls. Jump to 'failure' if the instance cannot be allocated here. 1004 // calls. Jump to 'failure' if the instance cannot be allocated here.
999 // Allocated instance is returned in 'instance_reg'. 1005 // Allocated instance is returned in 'instance_reg'.
1000 // Only the tags field of the object is initialized. 1006 // Only the tags field of the object is initialized.
1001 // Loads large immediates from the object pool with pool pointer in PP if it 1007 // Loads large immediates from the object pool with pool pointer in PP if it
1002 // is not kNoRegister 1008 // is not kNoRegister
1003 void TryAllocate(const Class& cls, 1009 void TryAllocate(const Class& cls,
1004 Label* failure, 1010 Label* failure,
1005 bool near_jump, 1011 bool near_jump,
1006 Register instance_reg, 1012 Register instance_reg,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 void VerifiedWrite(const Address& dest, 1128 void VerifiedWrite(const Address& dest,
1123 Register value, 1129 Register value,
1124 FieldContent old_content); 1130 FieldContent old_content);
1125 // Unaware of write barrier (use StoreInto* methods for storing to objects). 1131 // Unaware of write barrier (use StoreInto* methods for storing to objects).
1126 void MoveImmediate(const Address& dst, const Immediate& imm, Register pp); 1132 void MoveImmediate(const Address& dst, const Immediate& imm, Register pp);
1127 1133
1128 void ComputeCounterAddressesForCid(intptr_t cid, 1134 void ComputeCounterAddressesForCid(intptr_t cid,
1129 Heap::Space space, 1135 Heap::Space space,
1130 Address* count_address, 1136 Address* count_address,
1131 Address* size_address); 1137 Address* size_address);
1138 void ComputeHeapStatsStateAddressForCid(intptr_t cid,
1139 Address* state_address);
1132 DISALLOW_ALLOCATION(); 1140 DISALLOW_ALLOCATION();
1133 DISALLOW_COPY_AND_ASSIGN(Assembler); 1141 DISALLOW_COPY_AND_ASSIGN(Assembler);
1134 }; 1142 };
1135 1143
1136 1144
1137 inline void Assembler::EmitUint8(uint8_t value) { 1145 inline void Assembler::EmitUint8(uint8_t value) {
1138 buffer_.Emit<uint8_t>(value); 1146 buffer_.Emit<uint8_t>(value);
1139 } 1147 }
1140 1148
1141 1149
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 } 1213 }
1206 1214
1207 1215
1208 inline void Assembler::EmitOperandSizeOverride() { 1216 inline void Assembler::EmitOperandSizeOverride() {
1209 EmitUint8(0x66); 1217 EmitUint8(0x66);
1210 } 1218 }
1211 1219
1212 } // namespace dart 1220 } // namespace dart
1213 1221
1214 #endif // VM_ASSEMBLER_X64_H_ 1222 #endif // VM_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_mips.cc ('k') | runtime/vm/assembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698