author | dlong |
Thu, 14 Nov 2019 12:21:00 -0800 | |
changeset 59095 | 03fbcd06b4c0 |
parent 59053 | ba6c248cae19 |
permissions | -rw-r--r-- |
43972 | 1 |
/* |
53425
312880c38a7f
8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents:
52578
diff
changeset
|
2 |
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. |
43972 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
*/ |
|
50858 | 23 |
|
24 |
||
43972 | 25 |
package org.graalvm.compiler.hotspot; |
26 |
||
27 |
import java.lang.reflect.Field; |
|
28 |
import java.lang.reflect.Modifier; |
|
51126
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
29 |
import java.util.List; |
43972 | 30 |
|
46344 | 31 |
import org.graalvm.compiler.core.common.CompressEncoding; |
43972 | 32 |
import org.graalvm.compiler.hotspot.nodes.GraalHotSpotVMConfigNode; |
33 |
||
34 |
import jdk.vm.ci.common.JVMCIError; |
|
51126
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
35 |
import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod; |
43972 | 36 |
import jdk.vm.ci.hotspot.HotSpotVMConfigStore; |
51126
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
37 |
import jdk.vm.ci.meta.ResolvedJavaMethod; |
43972 | 38 |
|
39 |
/** |
|
40 |
* Used to access native configuration details. |
|
41 |
*/ |
|
49873 | 42 |
public class GraalHotSpotVMConfig extends GraalHotSpotVMConfigBase { |
43972 | 43 |
|
44 |
GraalHotSpotVMConfig(HotSpotVMConfigStore store) { |
|
45 |
super(store); |
|
46 |
||
46344 | 47 |
assert narrowKlassShift <= logKlassAlignment; |
48 |
assert narrowOopShift <= logMinObjAlignment(); |
|
49 |
oopEncoding = new CompressEncoding(narrowOopBase, narrowOopShift); |
|
50 |
klassEncoding = new CompressEncoding(narrowKlassBase, narrowKlassShift); |
|
43972 | 51 |
|
52 |
assert check(); |
|
53 |
} |
|
54 |
||
55 |
private final CompressEncoding oopEncoding; |
|
56 |
private final CompressEncoding klassEncoding; |
|
58299 | 57 |
private final String markWord = versioned.markWordFieldType; |
43972 | 58 |
|
59 |
public CompressEncoding getOopEncoding() { |
|
60 |
return oopEncoding; |
|
61 |
} |
|
62 |
||
63 |
public CompressEncoding getKlassEncoding() { |
|
64 |
return klassEncoding; |
|
65 |
} |
|
66 |
||
67 |
public final boolean cAssertions = getConstant("ASSERT", Boolean.class); |
|
68 |
||
69 |
public final int codeEntryAlignment = getFlag("CodeEntryAlignment", Integer.class); |
|
70 |
public final boolean enableContended = getFlag("EnableContended", Boolean.class); |
|
71 |
public final boolean restrictContended = getFlag("RestrictContended", Boolean.class); |
|
72 |
public final int contendedPaddingWidth = getFlag("ContendedPaddingWidth", Integer.class); |
|
73 |
public final int fieldsAllocationStyle = getFlag("FieldsAllocationStyle", Integer.class); |
|
74 |
public final boolean compactFields = getFlag("CompactFields", Boolean.class); |
|
75 |
public final boolean verifyOops = getFlag("VerifyOops", Boolean.class); |
|
76 |
public final boolean ciTime = getFlag("CITime", Boolean.class); |
|
77 |
public final boolean ciTimeEach = getFlag("CITimeEach", Boolean.class); |
|
78 |
public final boolean dontCompileHugeMethods = getFlag("DontCompileHugeMethods", Boolean.class); |
|
79 |
public final int hugeMethodLimit = getFlag("HugeMethodLimit", Integer.class); |
|
80 |
public final boolean printInlining = getFlag("PrintInlining", Boolean.class); |
|
81 |
public final boolean inline = getFlag("Inline", Boolean.class); |
|
49873 | 82 |
public final boolean inlineNotify = versioned.inlineNotify; |
43972 | 83 |
public final boolean useFastLocking = getFlag("JVMCIUseFastLocking", Boolean.class); |
84 |
public final boolean forceUnreachable = getFlag("ForceUnreachable", Boolean.class); |
|
85 |
public final int codeSegmentSize = getFlag("CodeCacheSegmentSize", Integer.class); |
|
86 |
public final boolean foldStableValues = getFlag("FoldStableValues", Boolean.class); |
|
49451 | 87 |
public final int maxVectorSize = getFlag("MaxVectorSize", Integer.class); |
43972 | 88 |
|
50330 | 89 |
public final boolean verifyBeforeGC = getFlag("VerifyBeforeGC", Boolean.class); |
90 |
public final boolean verifyAfterGC = getFlag("VerifyAfterGC", Boolean.class); |
|
91 |
||
43972 | 92 |
public final boolean useTLAB = getFlag("UseTLAB", Boolean.class); |
93 |
public final boolean useBiasedLocking = getFlag("UseBiasedLocking", Boolean.class); |
|
94 |
public final boolean usePopCountInstruction = getFlag("UsePopCountInstruction", Boolean.class); |
|
95 |
public final boolean useAESIntrinsics = getFlag("UseAESIntrinsics", Boolean.class); |
|
54084 | 96 |
public final boolean useAESCTRIntrinsics = getFlag("UseAESCTRIntrinsics", Boolean.class, false); |
43972 | 97 |
public final boolean useCRC32Intrinsics = getFlag("UseCRC32Intrinsics", Boolean.class); |
49873 | 98 |
public final boolean useCRC32CIntrinsics = versioned.useCRC32CIntrinsics; |
48172
e26fc5201707
8191437: AOT doesn't work easily after thread local handshakes
dlong
parents:
47798
diff
changeset
|
99 |
public final boolean threadLocalHandshakes = getFlag("ThreadLocalHandshakes", Boolean.class, false); |
43972 | 100 |
|
101 |
private final boolean useMultiplyToLenIntrinsic = getFlag("UseMultiplyToLenIntrinsic", Boolean.class); |
|
102 |
private final boolean useSHA1Intrinsics = getFlag("UseSHA1Intrinsics", Boolean.class); |
|
103 |
private final boolean useSHA256Intrinsics = getFlag("UseSHA256Intrinsics", Boolean.class); |
|
104 |
private final boolean useSHA512Intrinsics = getFlag("UseSHA512Intrinsics", Boolean.class); |
|
54084 | 105 |
private final boolean useGHASHIntrinsics = getFlag("UseGHASHIntrinsics", Boolean.class, false); |
54601 | 106 |
private final boolean useBase64Intrinsics = getFlag("UseBASE64Intrinsics", Boolean.class, false); |
43972 | 107 |
private final boolean useMontgomeryMultiplyIntrinsic = getFlag("UseMontgomeryMultiplyIntrinsic", Boolean.class, false); |
108 |
private final boolean useMontgomerySquareIntrinsic = getFlag("UseMontgomerySquareIntrinsic", Boolean.class, false); |
|
109 |
private final boolean useMulAddIntrinsic = getFlag("UseMulAddIntrinsic", Boolean.class, false); |
|
110 |
private final boolean useSquareToLenIntrinsic = getFlag("UseSquareToLenIntrinsic", Boolean.class, false); |
|
54084 | 111 |
public final boolean useVectorizedMismatchIntrinsic = getFlag("UseVectorizedMismatchIntrinsic", Boolean.class, false); |
54914 | 112 |
public final boolean useFMAIntrinsics = getFlag("UseFMA", Boolean.class, false); |
43972 | 113 |
|
59095 | 114 |
public final boolean preserveFramePointer = getFlag("PreserveFramePointer", Boolean.class, false); |
115 |
||
43972 | 116 |
/* |
117 |
* These are methods because in some JDKs the flags are visible but the stubs themselves haven't |
|
118 |
* been exported so we have to check both if the flag is on and if we have the stub. |
|
119 |
*/ |
|
120 |
public boolean useMultiplyToLenIntrinsic() { |
|
121 |
return useMultiplyToLenIntrinsic && multiplyToLen != 0; |
|
122 |
} |
|
123 |
||
124 |
public boolean useSHA1Intrinsics() { |
|
54084 | 125 |
return useSHA1Intrinsics && sha1ImplCompress != 0 && sha1ImplCompressMultiBlock != 0; |
43972 | 126 |
} |
127 |
||
128 |
public boolean useSHA256Intrinsics() { |
|
54084 | 129 |
return useSHA256Intrinsics && sha256ImplCompress != 0 && sha256ImplCompressMultiBlock != 0; |
43972 | 130 |
} |
131 |
||
132 |
public boolean useSHA512Intrinsics() { |
|
54084 | 133 |
return useSHA512Intrinsics && sha512ImplCompress != 0 && sha512ImplCompressMultiBlock != 0; |
134 |
} |
|
135 |
||
136 |
public boolean useGHASHIntrinsics() { |
|
137 |
return useGHASHIntrinsics && ghashProcessBlocks != 0; |
|
43972 | 138 |
} |
139 |
||
54601 | 140 |
public boolean useBase64Intrinsics() { |
141 |
return useBase64Intrinsics && base64EncodeBlock != 0; |
|
142 |
} |
|
143 |
||
43972 | 144 |
public boolean useMontgomeryMultiplyIntrinsic() { |
145 |
return useMontgomeryMultiplyIntrinsic && montgomeryMultiply != 0; |
|
146 |
} |
|
147 |
||
148 |
public boolean useMontgomerySquareIntrinsic() { |
|
149 |
return useMontgomerySquareIntrinsic && montgomerySquare != 0; |
|
150 |
} |
|
151 |
||
152 |
public boolean useMulAddIntrinsic() { |
|
153 |
return useMulAddIntrinsic && mulAdd != 0; |
|
154 |
} |
|
155 |
||
156 |
public boolean useSquareToLenIntrinsic() { |
|
157 |
return useSquareToLenIntrinsic && squareToLen != 0; |
|
158 |
} |
|
159 |
||
49873 | 160 |
public boolean inlineNotify() { |
161 |
return inlineNotify && notifyAddress != 0; |
|
162 |
} |
|
163 |
||
164 |
public boolean inlineNotifyAll() { |
|
165 |
return inlineNotify && notifyAllAddress != 0; |
|
166 |
} |
|
167 |
||
43972 | 168 |
public final boolean useG1GC = getFlag("UseG1GC", Boolean.class); |
169 |
||
170 |
public final int allocatePrefetchStyle = getFlag("AllocatePrefetchStyle", Integer.class); |
|
171 |
public final int allocatePrefetchInstr = getFlag("AllocatePrefetchInstr", Integer.class); |
|
172 |
public final int allocatePrefetchLines = getFlag("AllocatePrefetchLines", Integer.class); |
|
173 |
public final int allocateInstancePrefetchLines = getFlag("AllocateInstancePrefetchLines", Integer.class); |
|
174 |
public final int allocatePrefetchStepSize = getFlag("AllocatePrefetchStepSize", Integer.class); |
|
175 |
public final int allocatePrefetchDistance = getFlag("AllocatePrefetchDistance", Integer.class); |
|
176 |
||
177 |
private final long universeCollectedHeap = getFieldValue("CompilerToVM::Data::Universe_collectedHeap", Long.class, "CollectedHeap*"); |
|
178 |
private final int collectedHeapTotalCollectionsOffset = getFieldOffset("CollectedHeap::_total_collections", Integer.class, "unsigned int"); |
|
179 |
||
180 |
public long gcTotalCollectionsAddress() { |
|
181 |
return universeCollectedHeap + collectedHeapTotalCollectionsOffset; |
|
182 |
} |
|
183 |
||
55621 | 184 |
public final boolean useDeferredInitBarriers = getFlag("ReduceInitialCardMarks", Boolean.class); |
43972 | 185 |
|
186 |
// Compressed Oops related values. |
|
187 |
public final boolean useCompressedOops = getFlag("UseCompressedOops", Boolean.class); |
|
188 |
public final boolean useCompressedClassPointers = getFlag("UseCompressedClassPointers", Boolean.class); |
|
189 |
||
190 |
public final long narrowOopBase = getFieldValue("CompilerToVM::Data::Universe_narrow_oop_base", Long.class, "address"); |
|
191 |
public final int narrowOopShift = getFieldValue("CompilerToVM::Data::Universe_narrow_oop_shift", Integer.class, "int"); |
|
192 |
public final int objectAlignment = getFlag("ObjectAlignmentInBytes", Integer.class); |
|
193 |
||
194 |
public final int minObjAlignment() { |
|
195 |
return objectAlignment / heapWordSize; |
|
196 |
} |
|
197 |
||
198 |
public final int logMinObjAlignment() { |
|
199 |
return (int) (Math.log(objectAlignment) / Math.log(2)); |
|
200 |
} |
|
201 |
||
202 |
public final int narrowKlassSize = getFieldValue("CompilerToVM::Data::sizeof_narrowKlass", Integer.class, "int"); |
|
203 |
public final long narrowKlassBase = getFieldValue("CompilerToVM::Data::Universe_narrow_klass_base", Long.class, "address"); |
|
204 |
public final int narrowKlassShift = getFieldValue("CompilerToVM::Data::Universe_narrow_klass_shift", Integer.class, "int"); |
|
205 |
public final int logKlassAlignment = getConstant("LogKlassAlignmentInBytes", Integer.class); |
|
206 |
||
207 |
public final int stackShadowPages = getFlag("StackShadowPages", Integer.class); |
|
208 |
public final int stackReservedPages = getFlag("StackReservedPages", Integer.class, 0); |
|
209 |
public final boolean useStackBanging = getFlag("UseStackBanging", Boolean.class); |
|
210 |
public final int stackBias = getConstant("STACK_BIAS", Integer.class); |
|
211 |
public final int vmPageSize = getFieldValue("CompilerToVM::Data::vm_page_size", Integer.class, "int"); |
|
212 |
||
58299 | 213 |
public final int markOffset = getFieldOffset("oopDesc::_mark", Integer.class, markWord); |
43972 | 214 |
public final int hubOffset = getFieldOffset("oopDesc::_metadata._klass", Integer.class, "Klass*"); |
215 |
||
58299 | 216 |
public final int prototypeMarkWordOffset = getFieldOffset("Klass::_prototype_header", Integer.class, markWord); |
43972 | 217 |
public final int subklassOffset = getFieldOffset("Klass::_subklass", Integer.class, "Klass*"); |
218 |
public final int nextSiblingOffset = getFieldOffset("Klass::_next_sibling", Integer.class, "Klass*"); |
|
219 |
public final int superCheckOffsetOffset = getFieldOffset("Klass::_super_check_offset", Integer.class, "juint"); |
|
220 |
public final int secondarySuperCacheOffset = getFieldOffset("Klass::_secondary_super_cache", Integer.class, "Klass*"); |
|
221 |
public final int secondarySupersOffset = getFieldOffset("Klass::_secondary_supers", Integer.class, "Array<Klass*>*"); |
|
222 |
||
58299 | 223 |
public final boolean classMirrorIsHandle = versioned.classMirrorIsHandle; |
224 |
public final int classMirrorOffset = versioned.classMirrorOffset; |
|
43972 | 225 |
|
226 |
public final int klassSuperKlassOffset = getFieldOffset("Klass::_super", Integer.class, "Klass*"); |
|
227 |
public final int klassModifierFlagsOffset = getFieldOffset("Klass::_modifier_flags", Integer.class, "jint"); |
|
228 |
public final int klassAccessFlagsOffset = getFieldOffset("Klass::_access_flags", Integer.class, "AccessFlags"); |
|
229 |
public final int klassLayoutHelperOffset = getFieldOffset("Klass::_layout_helper", Integer.class, "jint"); |
|
230 |
||
231 |
public final int klassLayoutHelperNeutralValue = getConstant("Klass::_lh_neutral_value", Integer.class); |
|
232 |
public final int layoutHelperLog2ElementSizeShift = getConstant("Klass::_lh_log2_element_size_shift", Integer.class); |
|
233 |
public final int layoutHelperLog2ElementSizeMask = getConstant("Klass::_lh_log2_element_size_mask", Integer.class); |
|
234 |
public final int layoutHelperElementTypeShift = getConstant("Klass::_lh_element_type_shift", Integer.class); |
|
235 |
public final int layoutHelperElementTypeMask = getConstant("Klass::_lh_element_type_mask", Integer.class); |
|
236 |
public final int layoutHelperHeaderSizeShift = getConstant("Klass::_lh_header_size_shift", Integer.class); |
|
237 |
public final int layoutHelperHeaderSizeMask = getConstant("Klass::_lh_header_size_mask", Integer.class); |
|
238 |
public final int layoutHelperArrayTagShift = getConstant("Klass::_lh_array_tag_shift", Integer.class); |
|
239 |
public final int layoutHelperArrayTagTypeValue = getConstant("Klass::_lh_array_tag_type_value", Integer.class); |
|
240 |
public final int layoutHelperArrayTagObjectValue = getConstant("Klass::_lh_array_tag_obj_value", Integer.class); |
|
241 |
||
242 |
/** |
|
243 |
* This filters out the bit that differentiates a type array from an object array. |
|
244 |
*/ |
|
245 |
public int layoutHelperElementTypePrimitiveInPlace() { |
|
246 |
return (layoutHelperArrayTagTypeValue & ~layoutHelperArrayTagObjectValue) << layoutHelperArrayTagShift; |
|
247 |
} |
|
248 |
||
249 |
public final int vtableEntrySize = getFieldValue("CompilerToVM::Data::sizeof_vtableEntry", Integer.class, "int"); |
|
250 |
public final int vtableEntryMethodOffset = getFieldOffset("vtableEntry::_method", Integer.class, "Method*"); |
|
251 |
||
252 |
public final int instanceKlassInitStateOffset = getFieldOffset("InstanceKlass::_init_state", Integer.class, "u1"); |
|
58299 | 253 |
public final int instanceKlassInitThreadOffset = getFieldOffset("InstanceKlass::_init_thread", Integer.class, "Thread*", -1); |
43972 | 254 |
public final int instanceKlassConstantsOffset = getFieldOffset("InstanceKlass::_constants", Integer.class, "ConstantPool*"); |
255 |
public final int instanceKlassFieldsOffset = getFieldOffset("InstanceKlass::_fields", Integer.class, "Array<u2>*"); |
|
256 |
public final int klassVtableStartOffset = getFieldValue("CompilerToVM::Data::Klass_vtable_start_offset", Integer.class, "int"); |
|
257 |
public final int klassVtableLengthOffset = getFieldValue("CompilerToVM::Data::Klass_vtable_length_offset", Integer.class, "int"); |
|
258 |
||
259 |
public final int instanceKlassStateLinked = getConstant("InstanceKlass::linked", Integer.class); |
|
58299 | 260 |
public final int instanceKlassStateBeingInitialized = getConstant("InstanceKlass::being_initialized", Integer.class, -1); |
43972 | 261 |
public final int instanceKlassStateFullyInitialized = getConstant("InstanceKlass::fully_initialized", Integer.class); |
262 |
||
263 |
public final int arrayOopDescSize = getFieldValue("CompilerToVM::Data::sizeof_arrayOopDesc", Integer.class, "int"); |
|
264 |
||
265 |
/** |
|
266 |
* The offset of the array length word in an array object's header. |
|
267 |
* |
|
268 |
* See {@code arrayOopDesc::length_offset_in_bytes()}. |
|
269 |
*/ |
|
270 |
public final int arrayOopDescLengthOffset() { |
|
271 |
return useCompressedClassPointers ? hubOffset + narrowKlassSize : arrayOopDescSize; |
|
272 |
} |
|
273 |
||
274 |
public final int arrayU1LengthOffset = getFieldOffset("Array<int>::_length", Integer.class, "int"); |
|
275 |
public final int arrayU1DataOffset = getFieldOffset("Array<u1>::_data", Integer.class); |
|
276 |
public final int arrayU2DataOffset = getFieldOffset("Array<u2>::_data", Integer.class); |
|
277 |
public final int metaspaceArrayLengthOffset = getFieldOffset("Array<Klass*>::_length", Integer.class, "int"); |
|
278 |
public final int metaspaceArrayBaseOffset = getFieldOffset("Array<Klass*>::_data[0]", Integer.class, "Klass*"); |
|
279 |
||
280 |
public final int arrayClassElementOffset = getFieldOffset("ObjArrayKlass::_element_klass", Integer.class, "Klass*"); |
|
281 |
||
282 |
public final int fieldInfoAccessFlagsOffset = getConstant("FieldInfo::access_flags_offset", Integer.class); |
|
283 |
public final int fieldInfoNameIndexOffset = getConstant("FieldInfo::name_index_offset", Integer.class); |
|
284 |
public final int fieldInfoSignatureIndexOffset = getConstant("FieldInfo::signature_index_offset", Integer.class); |
|
285 |
public final int fieldInfoInitvalIndexOffset = getConstant("FieldInfo::initval_index_offset", Integer.class); |
|
286 |
public final int fieldInfoLowPackedOffset = getConstant("FieldInfo::low_packed_offset", Integer.class); |
|
287 |
public final int fieldInfoHighPackedOffset = getConstant("FieldInfo::high_packed_offset", Integer.class); |
|
288 |
public final int fieldInfoFieldSlots = getConstant("FieldInfo::field_slots", Integer.class); |
|
289 |
||
290 |
public final int fieldInfoTagSize = getConstant("FIELDINFO_TAG_SIZE", Integer.class); |
|
291 |
||
292 |
public final int jvmAccMonitorMatch = getConstant("JVM_ACC_MONITOR_MATCH", Integer.class); |
|
293 |
public final int jvmAccHasMonitorBytecodes = getConstant("JVM_ACC_HAS_MONITOR_BYTECODES", Integer.class); |
|
294 |
public final int jvmAccHasFinalizer = getConstant("JVM_ACC_HAS_FINALIZER", Integer.class); |
|
295 |
public final int jvmAccFieldInternal = getConstant("JVM_ACC_FIELD_INTERNAL", Integer.class); |
|
296 |
public final int jvmAccFieldStable = getConstant("JVM_ACC_FIELD_STABLE", Integer.class); |
|
297 |
public final int jvmAccFieldHasGenericSignature = getConstant("JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE", Integer.class); |
|
298 |
public final int jvmAccWrittenFlags = getConstant("JVM_ACC_WRITTEN_FLAGS", Integer.class); |
|
299 |
public final int jvmAccSynthetic = getConstant("JVM_ACC_SYNTHETIC", Integer.class); |
|
300 |
||
54328 | 301 |
public final int jvmciCompileStateCanPostOnExceptionsOffset = getJvmciJvmtiCapabilityOffset("_jvmti_can_post_on_exceptions"); |
302 |
public final int jvmciCompileStateCanPopFrameOffset = getJvmciJvmtiCapabilityOffset("_jvmti_can_pop_frame"); |
|
303 |
public final int jvmciCompileStateCanAccessLocalVariablesOffset = getJvmciJvmtiCapabilityOffset("_jvmti_can_access_local_variables"); |
|
54084 | 304 |
|
305 |
// Integer.MIN_VALUE if not available |
|
54328 | 306 |
private int getJvmciJvmtiCapabilityOffset(String name) { |
307 |
int offset = getFieldOffset("JVMCICompileState::" + name, Integer.class, "jbyte", Integer.MIN_VALUE); |
|
54084 | 308 |
if (offset == Integer.MIN_VALUE) { |
309 |
// JDK 12 |
|
54328 | 310 |
offset = getFieldOffset("JVMCIEnv::" + name, Integer.class, "jbyte", Integer.MIN_VALUE); |
54084 | 311 |
} |
312 |
return offset; |
|
313 |
} |
|
53425
312880c38a7f
8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents:
52578
diff
changeset
|
314 |
|
43972 | 315 |
public final int threadTlabOffset = getFieldOffset("Thread::_tlab", Integer.class, "ThreadLocalAllocBuffer"); |
316 |
public final int javaThreadAnchorOffset = getFieldOffset("JavaThread::_anchor", Integer.class, "JavaFrameAnchor"); |
|
53425
312880c38a7f
8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents:
52578
diff
changeset
|
317 |
public final int javaThreadShouldPostOnExceptionsFlagOffset = getFieldOffset("JavaThread::_should_post_on_exceptions_flag", Integer.class, "int", Integer.MIN_VALUE); |
43972 | 318 |
public final int threadObjectOffset = getFieldOffset("JavaThread::_threadObj", Integer.class, "oop"); |
58901
2700c409ff10
8229516: Thread.isInterrupted() always returns false after thread termination
dholmes
parents:
58533
diff
changeset
|
319 |
public final int osThreadOffset = getFieldOffset("JavaThread::_osthread", Integer.class, "OSThread*", Integer.MAX_VALUE); |
43972 | 320 |
public final int threadIsMethodHandleReturnOffset = getFieldOffset("JavaThread::_is_method_handle_return", Integer.class, "int"); |
321 |
public final int threadObjectResultOffset = getFieldOffset("JavaThread::_vm_result", Integer.class, "oop"); |
|
322 |
public final int jvmciCountersThreadOffset = getFieldOffset("JavaThread::_jvmci_counters", Integer.class, "jlong*"); |
|
55674
ff76baab1c90
8227068: [Graal] MappedByteBuffer bulk access memory failures are not handled gracefully
jcm
parents:
55621
diff
changeset
|
323 |
public final int doingUnsafeAccessOffset = getFieldOffset("JavaThread::_doing_unsafe_access", Integer.class, "bool", Integer.MAX_VALUE); |
49873 | 324 |
public final int javaThreadReservedStackActivationOffset = versioned.javaThreadReservedStackActivationOffset; |
58533 | 325 |
public final int jniEnvironmentOffset = getFieldOffset("JavaThread::_jni_environment", Integer.class, "JNIEnv", Integer.MIN_VALUE); |
43972 | 326 |
|
51126
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
327 |
public boolean requiresReservedStackCheck(List<ResolvedJavaMethod> methods) { |
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
328 |
if (enableStackReservedZoneAddress != 0 && methods != null) { |
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
329 |
for (ResolvedJavaMethod method : methods) { |
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
330 |
if (((HotSpotResolvedJavaMethod) method).hasReservedStackAccess()) { |
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
331 |
return true; |
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
332 |
} |
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
333 |
} |
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
334 |
} |
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
335 |
return false; |
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
336 |
} |
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
337 |
|
43972 | 338 |
/** |
339 |
* An invalid value for {@link #rtldDefault}. |
|
340 |
*/ |
|
341 |
public static final long INVALID_RTLD_DEFAULT_HANDLE = 0xDEADFACE; |
|
342 |
||
343 |
/** |
|
344 |
* Address of the library lookup routine. The C signature of this routine is: |
|
345 |
* |
|
346 |
* <pre> |
|
347 |
* void* (const char *filename, char *ebuf, int ebuflen) |
|
348 |
* </pre> |
|
349 |
*/ |
|
350 |
public final long dllLoad = getAddress("os::dll_load"); |
|
351 |
||
352 |
/** |
|
353 |
* Address of the library lookup routine. The C signature of this routine is: |
|
354 |
* |
|
355 |
* <pre> |
|
356 |
* void* (void* handle, const char* name) |
|
357 |
* </pre> |
|
358 |
*/ |
|
359 |
public final long dllLookup = getAddress("os::dll_lookup"); |
|
360 |
||
361 |
/** |
|
362 |
* A pseudo-handle which when used as the first argument to {@link #dllLookup} means lookup will |
|
363 |
* return the first occurrence of the desired symbol using the default library search order. If |
|
364 |
* this field is {@value #INVALID_RTLD_DEFAULT_HANDLE}, then this capability is not supported on |
|
365 |
* the current platform. |
|
366 |
*/ |
|
367 |
public final long rtldDefault = getAddress("RTLD_DEFAULT", osName.equals("bsd") || osName.equals("linux") ? null : INVALID_RTLD_DEFAULT_HANDLE); |
|
368 |
||
369 |
/** |
|
370 |
* This field is used to pass exception objects into and out of the runtime system during |
|
371 |
* exception handling for compiled code. |
|
372 |
*/ |
|
373 |
public final int threadExceptionOopOffset = getFieldOffset("JavaThread::_exception_oop", Integer.class, "oop"); |
|
374 |
public final int threadExceptionPcOffset = getFieldOffset("JavaThread::_exception_pc", Integer.class, "address"); |
|
375 |
public final int pendingExceptionOffset = getFieldOffset("ThreadShadow::_pending_exception", Integer.class, "oop"); |
|
376 |
||
377 |
public final int pendingDeoptimizationOffset = getFieldOffset("JavaThread::_pending_deoptimization", Integer.class, "int"); |
|
378 |
public final int pendingTransferToInterpreterOffset = getFieldOffset("JavaThread::_pending_transfer_to_interpreter", Integer.class, "bool"); |
|
379 |
||
380 |
private final int javaFrameAnchorLastJavaSpOffset = getFieldOffset("JavaFrameAnchor::_last_Java_sp", Integer.class, "intptr_t*"); |
|
381 |
private final int javaFrameAnchorLastJavaPcOffset = getFieldOffset("JavaFrameAnchor::_last_Java_pc", Integer.class, "address"); |
|
382 |
||
54084 | 383 |
public final int pendingFailedSpeculationOffset; |
384 |
{ |
|
385 |
String name = "JavaThread::_pending_failed_speculation"; |
|
386 |
int offset = -1; |
|
387 |
try { |
|
388 |
offset = getFieldOffset(name, Integer.class, "jlong"); |
|
389 |
} catch (JVMCIError e) { |
|
390 |
try { |
|
391 |
offset = getFieldOffset(name, Integer.class, "long"); |
|
392 |
} catch (JVMCIError e2) { |
|
393 |
} |
|
394 |
} |
|
395 |
if (offset == -1) { |
|
396 |
throw new JVMCIError("cannot get offset of field " + name + " with type long or jlong"); |
|
397 |
} |
|
398 |
pendingFailedSpeculationOffset = offset; |
|
399 |
} |
|
400 |
||
43972 | 401 |
public int threadLastJavaSpOffset() { |
402 |
return javaThreadAnchorOffset + javaFrameAnchorLastJavaSpOffset; |
|
403 |
} |
|
404 |
||
405 |
public int threadLastJavaPcOffset() { |
|
406 |
return javaThreadAnchorOffset + javaFrameAnchorLastJavaPcOffset; |
|
407 |
} |
|
408 |
||
409 |
public int threadLastJavaFpOffset() { |
|
410 |
assert osArch.equals("aarch64") || osArch.equals("amd64"); |
|
411 |
return javaThreadAnchorOffset + getFieldOffset("JavaFrameAnchor::_last_Java_fp", Integer.class, "intptr_t*"); |
|
412 |
} |
|
413 |
||
414 |
public int threadJavaFrameAnchorFlagsOffset() { |
|
415 |
assert osArch.equals("sparc"); |
|
416 |
return javaThreadAnchorOffset + getFieldOffset("JavaFrameAnchor::_flags", Integer.class, "int"); |
|
417 |
} |
|
418 |
||
419 |
public final int runtimeCallStackSize = getConstant("frame::arg_reg_save_area_bytes", Integer.class, intRequiredOnAMD64); |
|
420 |
public final int frameInterpreterFrameSenderSpOffset = getConstant("frame::interpreter_frame_sender_sp_offset", Integer.class, intRequiredOnAMD64); |
|
421 |
public final int frameInterpreterFrameLastSpOffset = getConstant("frame::interpreter_frame_last_sp_offset", Integer.class, intRequiredOnAMD64); |
|
422 |
||
58901
2700c409ff10
8229516: Thread.isInterrupted() always returns false after thread termination
dholmes
parents:
58533
diff
changeset
|
423 |
public final int osThreadInterruptedOffset = getFieldOffset("OSThread::_interrupted", Integer.class, "jint", Integer.MAX_VALUE); |
43972 | 424 |
|
58299 | 425 |
public final long markWordHashShift = getConstant(markWordField("hash_shift"), Long.class); |
43972 | 426 |
|
58299 | 427 |
public final int biasedLockMaskInPlace = getConstant(markWordField("biased_lock_mask_in_place"), Integer.class); |
428 |
public final int ageMaskInPlace = getConstant(markWordField("age_mask_in_place"), Integer.class); |
|
429 |
public final int epochMaskInPlace = getConstant(markWordField("epoch_mask_in_place"), Integer.class); |
|
430 |
public final long markWordHashMask = getConstant(markWordField("hash_mask"), Long.class); |
|
431 |
public final long markWordHashMaskInPlace = getConstant(markWordField("hash_mask_in_place"), Long.class); |
|
43972 | 432 |
|
58299 | 433 |
public final int unlockedMask = getConstant(markWordField("unlocked_value"), Integer.class); |
434 |
public final int monitorMask = getConstant(markWordField("monitor_value"), Integer.class, -1); |
|
435 |
public final int biasedLockPattern = getConstant(markWordField("biased_lock_pattern"), Integer.class); |
|
43972 | 436 |
|
46344 | 437 |
// This field has no type in vmStructs.cpp |
438 |
public final int objectMonitorOwner = getFieldOffset("ObjectMonitor::_owner", Integer.class, null, -1); |
|
439 |
public final int objectMonitorRecursions = getFieldOffset("ObjectMonitor::_recursions", Integer.class, "intptr_t", -1); |
|
440 |
public final int objectMonitorCxq = getFieldOffset("ObjectMonitor::_cxq", Integer.class, "ObjectWaiter*", -1); |
|
441 |
public final int objectMonitorEntryList = getFieldOffset("ObjectMonitor::_EntryList", Integer.class, "ObjectWaiter*", -1); |
|
54724 | 442 |
public final int objectMonitorSucc = getFieldOffset("ObjectMonitor::_succ", Integer.class, "Thread*", -1); |
46344 | 443 |
|
58299 | 444 |
public final int markWordNoHashInPlace = getConstant(markWordField("no_hash_in_place"), Integer.class); |
445 |
public final int markWordNoLockInPlace = getConstant(markWordField("no_lock_in_place"), Integer.class); |
|
43972 | 446 |
|
447 |
/** |
|
58299 | 448 |
* See {@code markOopDesc::prototype()}/{@code markWord::prototype()}. |
43972 | 449 |
*/ |
450 |
public long arrayPrototypeMarkWord() { |
|
451 |
return markWordNoHashInPlace | markWordNoLockInPlace; |
|
452 |
} |
|
453 |
||
454 |
/** |
|
58299 | 455 |
* See {@code markOopDesc::copy_set_hash()}/{@code markWord::copy_set_hash()}. |
43972 | 456 |
*/ |
457 |
public long tlabIntArrayMarkWord() { |
|
57777
90ead0febf56
8229258: Rework markOop and markOopDesc into a simpler mark word value carrier
stefank
parents:
55674
diff
changeset
|
458 |
long tmp = arrayPrototypeMarkWord() & (~markWordHashMaskInPlace); |
90ead0febf56
8229258: Rework markOop and markOopDesc into a simpler mark word value carrier
stefank
parents:
55674
diff
changeset
|
459 |
tmp |= ((0x2 & markWordHashMask) << markWordHashShift); |
43972 | 460 |
return tmp; |
461 |
} |
|
462 |
||
58299 | 463 |
private String markWordField(String simpleName) { |
464 |
return versioned.markWordClassName + "::" + simpleName; |
|
465 |
} |
|
466 |
||
43972 | 467 |
/** |
468 |
* Mark word right shift to get identity hash code. |
|
469 |
*/ |
|
58299 | 470 |
public final int identityHashCodeShift = getConstant(markWordField("hash_shift"), Integer.class); |
43972 | 471 |
|
472 |
/** |
|
473 |
* Identity hash code value when uninitialized. |
|
474 |
*/ |
|
58299 | 475 |
public final int uninitializedIdentityHashCodeValue = getConstant(markWordField("no_hash"), Integer.class); |
43972 | 476 |
|
477 |
public final int methodAccessFlagsOffset = getFieldOffset("Method::_access_flags", Integer.class, "AccessFlags"); |
|
478 |
public final int methodConstMethodOffset = getFieldOffset("Method::_constMethod", Integer.class, "ConstMethod*"); |
|
49873 | 479 |
public final int methodIntrinsicIdOffset = versioned.methodIntrinsicIdOffset; |
480 |
public final int methodFlagsOffset = versioned.methodFlagsOffset; |
|
43972 | 481 |
public final int methodVtableIndexOffset = getFieldOffset("Method::_vtable_index", Integer.class, "int"); |
482 |
||
483 |
public final int methodCountersOffset = getFieldOffset("Method::_method_counters", Integer.class, "MethodCounters*"); |
|
484 |
public final int methodDataOffset = getFieldOffset("Method::_method_data", Integer.class, "MethodData*"); |
|
485 |
public final int methodCompiledEntryOffset = getFieldOffset("Method::_from_compiled_entry", Integer.class, "address"); |
|
49873 | 486 |
public final int methodCodeOffset = versioned.methodCodeOffset; |
43972 | 487 |
|
488 |
public final int methodFlagsCallerSensitive = getConstant("Method::_caller_sensitive", Integer.class); |
|
489 |
public final int methodFlagsForceInline = getConstant("Method::_force_inline", Integer.class); |
|
490 |
public final int methodFlagsDontInline = getConstant("Method::_dont_inline", Integer.class); |
|
491 |
public final int methodFlagsHidden = getConstant("Method::_hidden", Integer.class); |
|
492 |
public final int nonvirtualVtableIndex = getConstant("Method::nonvirtual_vtable_index", Integer.class); |
|
493 |
public final int invalidVtableIndex = getConstant("Method::invalid_vtable_index", Integer.class); |
|
494 |
||
495 |
public final int invocationCounterOffset = getFieldOffset("MethodCounters::_invocation_counter", Integer.class, "InvocationCounter"); |
|
496 |
public final int backedgeCounterOffset = getFieldOffset("MethodCounters::_backedge_counter", Integer.class, "InvocationCounter"); |
|
49873 | 497 |
public final int invocationCounterIncrement = versioned.invocationCounterIncrement; |
498 |
public final int invocationCounterShift = versioned.invocationCounterShift; |
|
43972 | 499 |
|
500 |
public final int nmethodEntryOffset = getFieldOffset("nmethod::_verified_entry_point", |
|
501 |
Integer.class, "address"); |
|
502 |
public final int compilationLevelFullOptimization = getConstant("CompLevel_full_optimization", |
|
503 |
Integer.class); |
|
504 |
||
505 |
public final int constantPoolSize = getFieldValue("CompilerToVM::Data::sizeof_ConstantPool", Integer.class, "int"); |
|
506 |
public final int constantPoolLengthOffset = getFieldOffset("ConstantPool::_length", |
|
507 |
Integer.class, "int"); |
|
508 |
||
509 |
public final int heapWordSize = getConstant("HeapWordSize", Integer.class); |
|
510 |
||
511 |
/** |
|
512 |
* Bit pattern that represents a non-oop. Neither the high bits nor the low bits of this value |
|
513 |
* are allowed to look like (respectively) the high or low bits of a real oop. |
|
514 |
*/ |
|
515 |
public final long nonOopBits = getFieldValue("CompilerToVM::Data::Universe_non_oop_bits", Long.class, "void*"); |
|
516 |
||
517 |
public final long verifyOopCounterAddress = getFieldAddress("StubRoutines::_verify_oop_count", "jint"); |
|
518 |
public final long verifyOopMask = getFieldValue("CompilerToVM::Data::Universe_verify_oop_mask", Long.class, "uintptr_t"); |
|
519 |
public final long verifyOopBits = getFieldValue("CompilerToVM::Data::Universe_verify_oop_bits", Long.class, "uintptr_t"); |
|
520 |
||
521 |
public final int logOfHRGrainBytes = getFieldValue("HeapRegion::LogOfHRGrainBytes", Integer.class, "int"); |
|
522 |
||
523 |
public final long cardtableStartAddress = getFieldValue("CompilerToVM::Data::cardtable_start_address", Long.class, "jbyte*"); |
|
524 |
public final int cardtableShift = getFieldValue("CompilerToVM::Data::cardtable_shift", Integer.class, "int"); |
|
525 |
||
526 |
/** |
|
527 |
* This is the largest stack offset encodeable in an OopMapValue. Offsets larger than this will |
|
528 |
* throw an exception during code installation. |
|
529 |
*/ |
|
49873 | 530 |
public final int maxOopMapStackOffset = getFieldValue("CompilerToVM::Data::_max_oop_map_stack_offset", Integer.class, "int"); |
43972 | 531 |
|
532 |
public final long safepointPollingAddress = getFieldValue("os::_polling_page", Long.class, "address"); |
|
533 |
||
534 |
// G1 Collector Related Values. |
|
535 |
||
49873 | 536 |
public final byte dirtyCardValue = versioned.dirtyCardValue; |
537 |
public final byte g1YoungCardValue = versioned.g1YoungCardValue; |
|
538 |
||
539 |
public final int g1SATBQueueMarkingOffset = versioned.g1SATBQueueMarkingOffset; |
|
540 |
public final int g1SATBQueueIndexOffset = versioned.g1SATBQueueIndexOffset; |
|
541 |
public final int g1SATBQueueBufferOffset = versioned.g1SATBQueueBufferOffset; |
|
542 |
public final int g1CardQueueIndexOffset = versioned.g1CardQueueIndexOffset; |
|
543 |
public final int g1CardQueueBufferOffset = versioned.g1CardQueueBufferOffset; |
|
43972 | 544 |
|
545 |
public final int klassOffset = getFieldValue("java_lang_Class::_klass_offset", Integer.class, "int"); |
|
546 |
public final int arrayKlassOffset = getFieldValue("java_lang_Class::_array_klass_offset", Integer.class, "int"); |
|
547 |
||
548 |
public final int basicLockSize = getFieldValue("CompilerToVM::Data::sizeof_BasicLock", Integer.class, "int"); |
|
58299 | 549 |
public final int basicLockDisplacedHeaderOffset = getFieldOffset("BasicLock::_displaced_header", Integer.class, markWord); |
43972 | 550 |
|
48172
e26fc5201707
8191437: AOT doesn't work easily after thread local handshakes
dlong
parents:
47798
diff
changeset
|
551 |
public final int threadPollingPageOffset = getFieldOffset("Thread::_polling_page", Integer.class, "address", -1); |
43972 | 552 |
public final int threadAllocatedBytesOffset = getFieldOffset("Thread::_allocated_bytes", Integer.class, "jlong"); |
553 |
||
554 |
public final int tlabRefillWasteIncrement = getFlag("TLABWasteIncrement", Integer.class); |
|
555 |
||
556 |
private final int threadLocalAllocBufferStartOffset = getFieldOffset("ThreadLocalAllocBuffer::_start", Integer.class, "HeapWord*"); |
|
557 |
private final int threadLocalAllocBufferEndOffset = getFieldOffset("ThreadLocalAllocBuffer::_end", Integer.class, "HeapWord*"); |
|
558 |
private final int threadLocalAllocBufferTopOffset = getFieldOffset("ThreadLocalAllocBuffer::_top", Integer.class, "HeapWord*"); |
|
559 |
private final int threadLocalAllocBufferPfTopOffset = getFieldOffset("ThreadLocalAllocBuffer::_pf_top", Integer.class, "HeapWord*"); |
|
560 |
private final int threadLocalAllocBufferSlowAllocationsOffset = getFieldOffset("ThreadLocalAllocBuffer::_slow_allocations", Integer.class, "unsigned"); |
|
561 |
private final int threadLocalAllocBufferFastRefillWasteOffset = getFieldOffset("ThreadLocalAllocBuffer::_fast_refill_waste", Integer.class, "unsigned"); |
|
562 |
private final int threadLocalAllocBufferNumberOfRefillsOffset = getFieldOffset("ThreadLocalAllocBuffer::_number_of_refills", Integer.class, "unsigned"); |
|
563 |
private final int threadLocalAllocBufferRefillWasteLimitOffset = getFieldOffset("ThreadLocalAllocBuffer::_refill_waste_limit", Integer.class, "size_t"); |
|
564 |
private final int threadLocalAllocBufferDesiredSizeOffset = getFieldOffset("ThreadLocalAllocBuffer::_desired_size", Integer.class, "size_t"); |
|
565 |
||
566 |
public int tlabSlowAllocationsOffset() { |
|
567 |
return threadTlabOffset + threadLocalAllocBufferSlowAllocationsOffset; |
|
568 |
} |
|
569 |
||
570 |
public int tlabFastRefillWasteOffset() { |
|
571 |
return threadTlabOffset + threadLocalAllocBufferFastRefillWasteOffset; |
|
572 |
} |
|
573 |
||
574 |
public int tlabNumberOfRefillsOffset() { |
|
575 |
return threadTlabOffset + threadLocalAllocBufferNumberOfRefillsOffset; |
|
576 |
} |
|
577 |
||
578 |
public int tlabRefillWasteLimitOffset() { |
|
579 |
return threadTlabOffset + threadLocalAllocBufferRefillWasteLimitOffset; |
|
580 |
} |
|
581 |
||
582 |
public int threadTlabSizeOffset() { |
|
583 |
return threadTlabOffset + threadLocalAllocBufferDesiredSizeOffset; |
|
584 |
} |
|
585 |
||
586 |
public int threadTlabStartOffset() { |
|
587 |
return threadTlabOffset + threadLocalAllocBufferStartOffset; |
|
588 |
} |
|
589 |
||
590 |
public int threadTlabEndOffset() { |
|
591 |
return threadTlabOffset + threadLocalAllocBufferEndOffset; |
|
592 |
} |
|
593 |
||
594 |
public int threadTlabTopOffset() { |
|
595 |
return threadTlabOffset + threadLocalAllocBufferTopOffset; |
|
596 |
} |
|
597 |
||
598 |
public int threadTlabPfTopOffset() { |
|
599 |
return threadTlabOffset + threadLocalAllocBufferPfTopOffset; |
|
600 |
} |
|
601 |
||
602 |
public final int tlabAlignmentReserve = getFieldValue("CompilerToVM::Data::ThreadLocalAllocBuffer_alignment_reserve", Integer.class, "size_t"); |
|
603 |
||
604 |
public final boolean tlabStats = getFlag("TLABStats", Boolean.class); |
|
605 |
||
58299 | 606 |
// We set 0x10 as default value to disable DC ZVA if this field is not present in HotSpot. |
607 |
// ARMv8-A architecture reference manual D12.2.35 Data Cache Zero ID register says: |
|
608 |
// * BS, bits [3:0] indicate log2 of the DC ZVA block size in (4-byte) words. |
|
609 |
// * DZP, bit [4] of indicates whether use of DC ZVA instruction is prohibited. |
|
610 |
public final int psrInfoDczidValue = getFieldValue("VM_Version::_psr_info.dczid_el0", Integer.class, "uint32_t", 0x10); |
|
611 |
||
43972 | 612 |
// FIXME This is only temporary until the GC code is changed. |
613 |
public final boolean inlineContiguousAllocationSupported = getFieldValue("CompilerToVM::Data::_supports_inline_contig_alloc", Boolean.class); |
|
614 |
public final long heapEndAddress = getFieldValue("CompilerToVM::Data::_heap_end_addr", Long.class, "HeapWord**"); |
|
49873 | 615 |
public final long heapTopAddress = versioned.heapTopAddress; |
43972 | 616 |
|
47798 | 617 |
public final boolean cmsIncrementalMode = getFlag("CMSIncrementalMode", Boolean.class, false); |
618 |
||
43972 | 619 |
public final long inlineCacheMissStub = getFieldValue("CompilerToVM::Data::SharedRuntime_ic_miss_stub", Long.class, "address"); |
620 |
public final long handleWrongMethodStub = getFieldValue("CompilerToVM::Data::SharedRuntime_handle_wrong_method_stub", Long.class, "address"); |
|
621 |
||
622 |
public final long handleDeoptStub = getFieldValue("CompilerToVM::Data::SharedRuntime_deopt_blob_unpack", Long.class, "address"); |
|
623 |
public final long uncommonTrapStub = getFieldValue("CompilerToVM::Data::SharedRuntime_deopt_blob_uncommon_trap", Long.class, "address"); |
|
624 |
||
49873 | 625 |
public final long codeCacheLowBound = versioned.codeCacheLowBound; |
626 |
public final long codeCacheHighBound = versioned.codeCacheHighBound; |
|
43972 | 627 |
|
628 |
public final long aescryptEncryptBlockStub = getFieldValue("StubRoutines::_aescrypt_encryptBlock", Long.class, "address"); |
|
629 |
public final long aescryptDecryptBlockStub = getFieldValue("StubRoutines::_aescrypt_decryptBlock", Long.class, "address"); |
|
630 |
public final long cipherBlockChainingEncryptAESCryptStub = getFieldValue("StubRoutines::_cipherBlockChaining_encryptAESCrypt", Long.class, "address"); |
|
631 |
public final long cipherBlockChainingDecryptAESCryptStub = getFieldValue("StubRoutines::_cipherBlockChaining_decryptAESCrypt", Long.class, "address"); |
|
632 |
public final long updateBytesCRC32Stub = getFieldValue("StubRoutines::_updateBytesCRC32", Long.class, "address"); |
|
633 |
public final long crcTableAddress = getFieldValue("StubRoutines::_crc_table_adr", Long.class, "address"); |
|
634 |
||
635 |
public final long sha1ImplCompress = getFieldValue("StubRoutines::_sha1_implCompress", Long.class, "address", 0L); |
|
54084 | 636 |
public final long sha1ImplCompressMultiBlock = getFieldValue("StubRoutines::_sha1_implCompressMB", Long.class, "address", 0L); |
43972 | 637 |
public final long sha256ImplCompress = getFieldValue("StubRoutines::_sha256_implCompress", Long.class, "address", 0L); |
54084 | 638 |
public final long sha256ImplCompressMultiBlock = getFieldValue("StubRoutines::_sha256_implCompressMB", Long.class, "address", 0L); |
43972 | 639 |
public final long sha512ImplCompress = getFieldValue("StubRoutines::_sha512_implCompress", Long.class, "address", 0L); |
54084 | 640 |
public final long sha512ImplCompressMultiBlock = getFieldValue("StubRoutines::_sha512_implCompressMB", Long.class, "address", 0L); |
46344 | 641 |
public final long multiplyToLen = getFieldValue("StubRoutines::_multiplyToLen", Long.class, "address", longRequiredOnAMD64); |
43972 | 642 |
|
643 |
public final long counterModeAESCrypt = getFieldValue("StubRoutines::_counterMode_AESCrypt", Long.class, "address", 0L); |
|
644 |
public final long ghashProcessBlocks = getFieldValue("StubRoutines::_ghash_processBlocks", Long.class, "address", 0L); |
|
54601 | 645 |
public final long base64EncodeBlock = getFieldValue("StubRoutines::_base64_encodeBlock", Long.class, "address", 0L); |
43972 | 646 |
public final long crc32cTableTddr = getFieldValue("StubRoutines::_crc32c_table_addr", Long.class, "address", 0L); |
647 |
public final long updateBytesCRC32C = getFieldValue("StubRoutines::_updateBytesCRC32C", Long.class, "address", 0L); |
|
648 |
public final long updateBytesAdler32 = getFieldValue("StubRoutines::_updateBytesAdler32", Long.class, "address", 0L); |
|
46344 | 649 |
public final long squareToLen = getFieldValue("StubRoutines::_squareToLen", Long.class, "address", longRequiredOnAMD64); |
650 |
public final long mulAdd = getFieldValue("StubRoutines::_mulAdd", Long.class, "address", longRequiredOnAMD64); |
|
651 |
public final long montgomeryMultiply = getFieldValue("StubRoutines::_montgomeryMultiply", Long.class, "address", longRequiredOnAMD64); |
|
652 |
public final long montgomerySquare = getFieldValue("StubRoutines::_montgomerySquare", Long.class, "address", longRequiredOnAMD64); |
|
43972 | 653 |
public final long vectorizedMismatch = getFieldValue("StubRoutines::_vectorizedMismatch", Long.class, "address", 0L); |
654 |
||
49873 | 655 |
public final long throwDelayedStackOverflowErrorEntry = versioned.throwDelayedStackOverflowErrorEntry; |
43972 | 656 |
|
657 |
public final long jbyteArraycopy = getFieldValue("StubRoutines::_jbyte_arraycopy", Long.class, "address"); |
|
658 |
public final long jshortArraycopy = getFieldValue("StubRoutines::_jshort_arraycopy", Long.class, "address"); |
|
659 |
public final long jintArraycopy = getFieldValue("StubRoutines::_jint_arraycopy", Long.class, "address"); |
|
660 |
public final long jlongArraycopy = getFieldValue("StubRoutines::_jlong_arraycopy", Long.class, "address"); |
|
661 |
public final long oopArraycopy = getFieldValue("StubRoutines::_oop_arraycopy", Long.class, "address"); |
|
662 |
public final long oopArraycopyUninit = getFieldValue("StubRoutines::_oop_arraycopy_uninit", Long.class, "address"); |
|
663 |
public final long jbyteDisjointArraycopy = getFieldValue("StubRoutines::_jbyte_disjoint_arraycopy", Long.class, "address"); |
|
664 |
public final long jshortDisjointArraycopy = getFieldValue("StubRoutines::_jshort_disjoint_arraycopy", Long.class, "address"); |
|
665 |
public final long jintDisjointArraycopy = getFieldValue("StubRoutines::_jint_disjoint_arraycopy", Long.class, "address"); |
|
666 |
public final long jlongDisjointArraycopy = getFieldValue("StubRoutines::_jlong_disjoint_arraycopy", Long.class, "address"); |
|
667 |
public final long oopDisjointArraycopy = getFieldValue("StubRoutines::_oop_disjoint_arraycopy", Long.class, "address"); |
|
668 |
public final long oopDisjointArraycopyUninit = getFieldValue("StubRoutines::_oop_disjoint_arraycopy_uninit", Long.class, "address"); |
|
669 |
public final long jbyteAlignedArraycopy = getFieldValue("StubRoutines::_arrayof_jbyte_arraycopy", Long.class, "address"); |
|
670 |
public final long jshortAlignedArraycopy = getFieldValue("StubRoutines::_arrayof_jshort_arraycopy", Long.class, "address"); |
|
671 |
public final long jintAlignedArraycopy = getFieldValue("StubRoutines::_arrayof_jint_arraycopy", Long.class, "address"); |
|
672 |
public final long jlongAlignedArraycopy = getFieldValue("StubRoutines::_arrayof_jlong_arraycopy", Long.class, "address"); |
|
673 |
public final long oopAlignedArraycopy = getFieldValue("StubRoutines::_arrayof_oop_arraycopy", Long.class, "address"); |
|
674 |
public final long oopAlignedArraycopyUninit = getFieldValue("StubRoutines::_arrayof_oop_arraycopy_uninit", Long.class, "address"); |
|
675 |
public final long jbyteAlignedDisjointArraycopy = getFieldValue("StubRoutines::_arrayof_jbyte_disjoint_arraycopy", Long.class, "address"); |
|
676 |
public final long jshortAlignedDisjointArraycopy = getFieldValue("StubRoutines::_arrayof_jshort_disjoint_arraycopy", Long.class, "address"); |
|
677 |
public final long jintAlignedDisjointArraycopy = getFieldValue("StubRoutines::_arrayof_jint_disjoint_arraycopy", Long.class, "address"); |
|
678 |
public final long jlongAlignedDisjointArraycopy = getFieldValue("StubRoutines::_arrayof_jlong_disjoint_arraycopy", Long.class, "address"); |
|
679 |
public final long oopAlignedDisjointArraycopy = getFieldValue("StubRoutines::_arrayof_oop_disjoint_arraycopy", Long.class, "address"); |
|
680 |
public final long oopAlignedDisjointArraycopyUninit = getFieldValue("StubRoutines::_arrayof_oop_disjoint_arraycopy_uninit", Long.class, "address"); |
|
681 |
public final long checkcastArraycopy = getFieldValue("StubRoutines::_checkcast_arraycopy", Long.class, "address"); |
|
682 |
public final long checkcastArraycopyUninit = getFieldValue("StubRoutines::_checkcast_arraycopy_uninit", Long.class, "address"); |
|
683 |
public final long unsafeArraycopy = getFieldValue("StubRoutines::_unsafe_arraycopy", Long.class, "address"); |
|
684 |
public final long genericArraycopy = getFieldValue("StubRoutines::_generic_arraycopy", Long.class, "address"); |
|
685 |
||
52033
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
686 |
// Allocation stubs that throw an exception when allocation fails |
43972 | 687 |
public final long newInstanceAddress = getAddress("JVMCIRuntime::new_instance"); |
688 |
public final long newArrayAddress = getAddress("JVMCIRuntime::new_array"); |
|
689 |
public final long newMultiArrayAddress = getAddress("JVMCIRuntime::new_multi_array"); |
|
52578 | 690 |
public final long dynamicNewInstanceAddress = getAddress("JVMCIRuntime::dynamic_new_instance"); |
52033
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
691 |
|
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
692 |
// Allocation stubs that return null when allocation fails |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
693 |
public final long newInstanceOrNullAddress = getAddress("JVMCIRuntime::new_instance_or_null", 0L); |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
694 |
public final long newArrayOrNullAddress = getAddress("JVMCIRuntime::new_array_or_null", 0L); |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
695 |
public final long newMultiArrayOrNullAddress = getAddress("JVMCIRuntime::new_multi_array_or_null", 0L); |
52578 | 696 |
public final long dynamicNewInstanceOrNullAddress = getAddress("JVMCIRuntime::dynamic_new_instance_or_null", 0L); |
52033
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
697 |
|
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
698 |
public boolean areNullAllocationStubsAvailable() { |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
699 |
return newInstanceOrNullAddress != 0L; |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
700 |
} |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
701 |
|
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
702 |
/** |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
703 |
* Checks that HotSpot implements all or none of the allocate-or-null stubs. |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
704 |
*/ |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
705 |
private boolean checkNullAllocationStubs() { |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
706 |
if (newInstanceOrNullAddress == 0L) { |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
707 |
assert newArrayOrNullAddress == 0L; |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
708 |
assert newMultiArrayOrNullAddress == 0L; |
52578 | 709 |
assert dynamicNewInstanceOrNullAddress == 0L; |
52033
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
710 |
} else { |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
711 |
assert newArrayOrNullAddress != 0L; |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
712 |
assert newMultiArrayOrNullAddress != 0L; |
52578 | 713 |
assert dynamicNewInstanceOrNullAddress != 0L; |
52033
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
714 |
} |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
715 |
return true; |
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
716 |
} |
43972 | 717 |
|
718 |
public final long vmMessageAddress = getAddress("JVMCIRuntime::vm_message"); |
|
719 |
public final long identityHashCodeAddress = getAddress("JVMCIRuntime::identity_hash_code"); |
|
720 |
public final long exceptionHandlerForPcAddress = getAddress("JVMCIRuntime::exception_handler_for_pc"); |
|
721 |
public final long monitorenterAddress = getAddress("JVMCIRuntime::monitorenter"); |
|
722 |
public final long monitorexitAddress = getAddress("JVMCIRuntime::monitorexit"); |
|
49873 | 723 |
public final long notifyAddress = getAddress("JVMCIRuntime::object_notify", 0L); |
724 |
public final long notifyAllAddress = getAddress("JVMCIRuntime::object_notifyAll", 0L); |
|
43972 | 725 |
public final long throwAndPostJvmtiExceptionAddress = getAddress("JVMCIRuntime::throw_and_post_jvmti_exception"); |
726 |
public final long throwKlassExternalNameExceptionAddress = getAddress("JVMCIRuntime::throw_klass_external_name_exception"); |
|
727 |
public final long throwClassCastExceptionAddress = getAddress("JVMCIRuntime::throw_class_cast_exception"); |
|
728 |
public final long logPrimitiveAddress = getAddress("JVMCIRuntime::log_primitive"); |
|
729 |
public final long logObjectAddress = getAddress("JVMCIRuntime::log_object"); |
|
730 |
public final long logPrintfAddress = getAddress("JVMCIRuntime::log_printf"); |
|
731 |
public final long vmErrorAddress = getAddress("JVMCIRuntime::vm_error"); |
|
732 |
public final long loadAndClearExceptionAddress = getAddress("JVMCIRuntime::load_and_clear_exception"); |
|
733 |
public final long writeBarrierPreAddress = getAddress("JVMCIRuntime::write_barrier_pre"); |
|
734 |
public final long writeBarrierPostAddress = getAddress("JVMCIRuntime::write_barrier_post"); |
|
735 |
public final long validateObject = getAddress("JVMCIRuntime::validate_object"); |
|
736 |
||
737 |
public final long testDeoptimizeCallInt = getAddress("JVMCIRuntime::test_deoptimize_call_int"); |
|
738 |
||
739 |
public final long registerFinalizerAddress = getAddress("SharedRuntime::register_finalizer"); |
|
740 |
public final long exceptionHandlerForReturnAddressAddress = getAddress("SharedRuntime::exception_handler_for_return_address"); |
|
741 |
public final long osrMigrationEndAddress = getAddress("SharedRuntime::OSR_migration_end"); |
|
49873 | 742 |
public final long enableStackReservedZoneAddress = versioned.enableStackReservedZoneAddress; |
43972 | 743 |
|
744 |
public final long javaTimeMillisAddress = getAddress("os::javaTimeMillis"); |
|
745 |
public final long javaTimeNanosAddress = getAddress("os::javaTimeNanos"); |
|
746 |
public final long arithmeticSinAddress = getFieldValue("CompilerToVM::Data::dsin", Long.class, "address"); |
|
747 |
public final long arithmeticCosAddress = getFieldValue("CompilerToVM::Data::dcos", Long.class, "address"); |
|
748 |
public final long arithmeticTanAddress = getFieldValue("CompilerToVM::Data::dtan", Long.class, "address"); |
|
749 |
public final long arithmeticExpAddress = getFieldValue("CompilerToVM::Data::dexp", Long.class, "address"); |
|
750 |
public final long arithmeticLogAddress = getFieldValue("CompilerToVM::Data::dlog", Long.class, "address"); |
|
751 |
public final long arithmeticLog10Address = getFieldValue("CompilerToVM::Data::dlog10", Long.class, "address"); |
|
752 |
public final long arithmeticPowAddress = getFieldValue("CompilerToVM::Data::dpow", Long.class, "address"); |
|
753 |
||
754 |
public final long fremAddress = getAddress("SharedRuntime::frem"); |
|
755 |
public final long dremAddress = getAddress("SharedRuntime::drem"); |
|
756 |
||
757 |
public final int jvmciCountersSize = getFlag("JVMCICounterSize", Integer.class); |
|
758 |
||
759 |
public final long deoptimizationFetchUnrollInfo = getAddress("Deoptimization::fetch_unroll_info"); |
|
760 |
public final long deoptimizationUncommonTrap = getAddress("Deoptimization::uncommon_trap"); |
|
761 |
public final long deoptimizationUnpackFrames = getAddress("Deoptimization::unpack_frames"); |
|
762 |
||
763 |
public final int deoptimizationUnpackDeopt = getConstant("Deoptimization::Unpack_deopt", Integer.class); |
|
764 |
public final int deoptimizationUnpackException = getConstant("Deoptimization::Unpack_exception", Integer.class); |
|
765 |
public final int deoptimizationUnpackUncommonTrap = getConstant("Deoptimization::Unpack_uncommon_trap", Integer.class); |
|
766 |
public final int deoptimizationUnpackReexecute = getConstant("Deoptimization::Unpack_reexecute", Integer.class); |
|
767 |
||
768 |
public final int deoptimizationUnrollBlockSizeOfDeoptimizedFrameOffset = getFieldOffset("Deoptimization::UnrollBlock::_size_of_deoptimized_frame", Integer.class, "int"); |
|
769 |
public final int deoptimizationUnrollBlockCallerAdjustmentOffset = getFieldOffset("Deoptimization::UnrollBlock::_caller_adjustment", Integer.class, "int"); |
|
770 |
public final int deoptimizationUnrollBlockNumberOfFramesOffset = getFieldOffset("Deoptimization::UnrollBlock::_number_of_frames", Integer.class, "int"); |
|
771 |
public final int deoptimizationUnrollBlockTotalFrameSizesOffset = getFieldOffset("Deoptimization::UnrollBlock::_total_frame_sizes", Integer.class, "int"); |
|
772 |
public final int deoptimizationUnrollBlockUnpackKindOffset = getFieldOffset("Deoptimization::UnrollBlock::_unpack_kind", Integer.class, "int"); |
|
773 |
public final int deoptimizationUnrollBlockFrameSizesOffset = getFieldOffset("Deoptimization::UnrollBlock::_frame_sizes", Integer.class, "intptr_t*"); |
|
774 |
public final int deoptimizationUnrollBlockFramePcsOffset = getFieldOffset("Deoptimization::UnrollBlock::_frame_pcs", Integer.class, "address*"); |
|
775 |
public final int deoptimizationUnrollBlockInitialInfoOffset = getFieldOffset("Deoptimization::UnrollBlock::_initial_info", Integer.class, "intptr_t"); |
|
776 |
||
777 |
// Checkstyle: stop |
|
778 |
public final int MARKID_VERIFIED_ENTRY = getConstant("CodeInstaller::VERIFIED_ENTRY", Integer.class); |
|
779 |
public final int MARKID_UNVERIFIED_ENTRY = getConstant("CodeInstaller::UNVERIFIED_ENTRY", Integer.class); |
|
780 |
public final int MARKID_OSR_ENTRY = getConstant("CodeInstaller::OSR_ENTRY", Integer.class); |
|
781 |
public final int MARKID_EXCEPTION_HANDLER_ENTRY = getConstant("CodeInstaller::EXCEPTION_HANDLER_ENTRY", Integer.class); |
|
782 |
public final int MARKID_DEOPT_HANDLER_ENTRY = getConstant("CodeInstaller::DEOPT_HANDLER_ENTRY", Integer.class); |
|
783 |
public final int MARKID_INVOKEINTERFACE = getConstant("CodeInstaller::INVOKEINTERFACE", Integer.class); |
|
784 |
public final int MARKID_INVOKEVIRTUAL = getConstant("CodeInstaller::INVOKEVIRTUAL", Integer.class); |
|
785 |
public final int MARKID_INVOKESTATIC = getConstant("CodeInstaller::INVOKESTATIC", Integer.class); |
|
786 |
public final int MARKID_INVOKESPECIAL = getConstant("CodeInstaller::INVOKESPECIAL", Integer.class); |
|
787 |
public final int MARKID_INLINE_INVOKE = getConstant("CodeInstaller::INLINE_INVOKE", Integer.class); |
|
788 |
public final int MARKID_POLL_NEAR = getConstant("CodeInstaller::POLL_NEAR", Integer.class); |
|
789 |
public final int MARKID_POLL_RETURN_NEAR = getConstant("CodeInstaller::POLL_RETURN_NEAR", Integer.class); |
|
790 |
public final int MARKID_POLL_FAR = getConstant("CodeInstaller::POLL_FAR", Integer.class); |
|
791 |
public final int MARKID_POLL_RETURN_FAR = getConstant("CodeInstaller::POLL_RETURN_FAR", Integer.class); |
|
792 |
public final int MARKID_CARD_TABLE_SHIFT = getConstant("CodeInstaller::CARD_TABLE_SHIFT", Integer.class); |
|
793 |
public final int MARKID_CARD_TABLE_ADDRESS = getConstant("CodeInstaller::CARD_TABLE_ADDRESS", Integer.class); |
|
794 |
public final int MARKID_INVOKE_INVALID = getConstant("CodeInstaller::INVOKE_INVALID", Integer.class); |
|
795 |
||
796 |
/** |
|
797 |
* The following constants are given default values here since they are missing in the native |
|
798 |
* JVMCI-8 code but are still required for {@link GraalHotSpotVMConfigNode#canonical} to work in |
|
799 |
* a JDK8 environment. |
|
800 |
*/ |
|
801 |
public final int MARKID_HEAP_TOP_ADDRESS = getConstant("CodeInstaller::HEAP_TOP_ADDRESS", Integer.class, 17); |
|
802 |
public final int MARKID_HEAP_END_ADDRESS = getConstant("CodeInstaller::HEAP_END_ADDRESS", Integer.class, 18); |
|
803 |
public final int MARKID_NARROW_KLASS_BASE_ADDRESS = getConstant("CodeInstaller::NARROW_KLASS_BASE_ADDRESS", Integer.class, 19); |
|
804 |
public final int MARKID_NARROW_OOP_BASE_ADDRESS = getConstant("CodeInstaller::NARROW_OOP_BASE_ADDRESS", Integer.class, 20); |
|
805 |
public final int MARKID_CRC_TABLE_ADDRESS = getConstant("CodeInstaller::CRC_TABLE_ADDRESS", Integer.class, 21); |
|
806 |
public final int MARKID_LOG_OF_HEAP_REGION_GRAIN_BYTES = getConstant("CodeInstaller::LOG_OF_HEAP_REGION_GRAIN_BYTES", Integer.class, 22); |
|
807 |
public final int MARKID_INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED = getConstant("CodeInstaller::INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED", Integer.class, 23); |
|
808 |
||
809 |
// Checkstyle: resume |
|
810 |
||
811 |
protected boolean check() { |
|
812 |
for (Field f : getClass().getDeclaredFields()) { |
|
813 |
int modifiers = f.getModifiers(); |
|
814 |
if (Modifier.isPublic(modifiers) && !Modifier.isStatic(modifiers)) { |
|
815 |
assert Modifier.isFinal(modifiers) : "field should be final: " + f; |
|
816 |
} |
|
817 |
} |
|
818 |
||
819 |
assert codeEntryAlignment > 0 : codeEntryAlignment; |
|
52033
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51436
diff
changeset
|
820 |
assert checkNullAllocationStubs(); |
43972 | 821 |
return true; |
822 |
} |
|
823 |
} |