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 */
23
24
25 package org.graalvm.compiler.hotspot;
26
27 import jdk.vm.ci.hotspot.HotSpotVMConfigAccess;
28 import jdk.vm.ci.hotspot.HotSpotVMConfigStore;
29
30 /**
31 * This is a source with different versions for various JDKs. When modifying/adding a field in this
32 * class accessed from outside this class, be sure to update the field appropriately in all source
33 * files named {@code GraalHotSpotVMConfigVersioned.java}.
34 *
35 * Fields are grouped according to the most recent JBS issue showing why they are versioned.
36 *
37 * JDK Version: 11+
38 */
39 final class GraalHotSpotVMConfigVersioned extends HotSpotVMConfigAccess {
40
41 GraalHotSpotVMConfigVersioned(HotSpotVMConfigStore store) {
42 super(store);
43 }
44
45 private boolean initInlineNotify() {
46 String syncKnobs = getFlag("SyncKnobs", String.class, "");
47 return syncKnobs == null || !syncKnobs.contains("InlineNotify=0");
48 }
49
50 // JSK-8132287
51 boolean inlineNotify = initInlineNotify();
52
53 // JDK-8073583
54 boolean useCRC32CIntrinsics = getFlag("UseCRC32CIntrinsics", Boolean.class);
55
56 // JDK-8046936
57 int javaThreadReservedStackActivationOffset = getFieldOffset("JavaThread::_reserved_stack_activation", Integer.class, "address");
58 int methodFlagsOffset = getFieldOffset("Method::_flags", Integer.class, "u2");
59 long throwDelayedStackOverflowErrorEntry = getFieldValue("StubRoutines::_throw_delayed_StackOverflowError_entry", Long.class, "address");
60 long enableStackReservedZoneAddress = getAddress("SharedRuntime::enable_stack_reserved_zone");
61
62 // JDK-8135085
63 int methodIntrinsicIdOffset = getFieldOffset("Method::_intrinsic_id", Integer.class, "u2");
64
65 // JDK-8151956
66 int methodCodeOffset = getFieldOffset("Method::_code", Integer.class, "CompiledMethod*");
67
68 // JDK-8059606
69 int invocationCounterIncrement = getConstant("InvocationCounter::count_increment", Integer.class);
70 int invocationCounterShift = getConstant("InvocationCounter::count_shift", Integer.class);
71
|
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 */
23
24
25 package org.graalvm.compiler.hotspot;
26
27 import jdk.vm.ci.hotspot.HotSpotVMConfigAccess;
28 import jdk.vm.ci.hotspot.HotSpotVMConfigStore;
29
30 /**
31 * This is a source with different versions for various JDKs. When modifying/adding a field in this
32 * class accessed from outside this class, be sure to update the field appropriately in all source
33 * files named {@code GraalHotSpotVMConfigVersioned.java}.
34 *
35 * Fields are grouped according to the most recent JBS issue showing why they are versioned.
36 *
37 * JDK Version: 12+
38 */
39 final class GraalHotSpotVMConfigVersioned extends HotSpotVMConfigAccess {
40
41 GraalHotSpotVMConfigVersioned(HotSpotVMConfigStore store) {
42 super(store);
43 }
44
45 // JDK-8210848
46 boolean inlineNotify = true;
47
48 // JDK-8073583
49 boolean useCRC32CIntrinsics = getFlag("UseCRC32CIntrinsics", Boolean.class);
50
51 // JDK-8046936
52 int javaThreadReservedStackActivationOffset = getFieldOffset("JavaThread::_reserved_stack_activation", Integer.class, "address");
53 int methodFlagsOffset = getFieldOffset("Method::_flags", Integer.class, "u2");
54 long throwDelayedStackOverflowErrorEntry = getFieldValue("StubRoutines::_throw_delayed_StackOverflowError_entry", Long.class, "address");
55 long enableStackReservedZoneAddress = getAddress("SharedRuntime::enable_stack_reserved_zone");
56
57 // JDK-8135085
58 int methodIntrinsicIdOffset = getFieldOffset("Method::_intrinsic_id", Integer.class, "u2");
59
60 // JDK-8151956
61 int methodCodeOffset = getFieldOffset("Method::_code", Integer.class, "CompiledMethod*");
62
63 // JDK-8059606
64 int invocationCounterIncrement = getConstant("InvocationCounter::count_increment", Integer.class);
65 int invocationCounterShift = getConstant("InvocationCounter::count_shift", Integer.class);
66
|