49873
|
1 |
/*
|
58299
|
2 |
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
49873
|
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 |
|
49873
|
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 |
*
|
58299
|
37 |
* JDK Version: 14+
|
49873
|
38 |
*/
|
|
39 |
final class GraalHotSpotVMConfigVersioned extends HotSpotVMConfigAccess {
|
|
40 |
|
|
41 |
GraalHotSpotVMConfigVersioned(HotSpotVMConfigStore store) {
|
|
42 |
super(store);
|
|
43 |
}
|
|
44 |
|
52578
|
45 |
// JDK-8210848
|
|
46 |
boolean inlineNotify = true;
|
50330
|
47 |
|
49873
|
48 |
// JDK-8073583
|
51436
|
49 |
boolean useCRC32CIntrinsics = getFlag("UseCRC32CIntrinsics", Boolean.class);
|
49873
|
50 |
|
|
51 |
// JDK-8046936
|
51436
|
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");
|
49873
|
56 |
|
|
57 |
// JDK-8135085
|
51436
|
58 |
int methodIntrinsicIdOffset = getFieldOffset("Method::_intrinsic_id", Integer.class, "u2");
|
49873
|
59 |
|
|
60 |
// JDK-8151956
|
51436
|
61 |
int methodCodeOffset = getFieldOffset("Method::_code", Integer.class, "CompiledMethod*");
|
49873
|
62 |
|
|
63 |
// JDK-8059606
|
51436
|
64 |
int invocationCounterIncrement = getConstant("InvocationCounter::count_increment", Integer.class);
|
|
65 |
int invocationCounterShift = getConstant("InvocationCounter::count_shift", Integer.class);
|
49873
|
66 |
|
|
67 |
// JDK-8195142
|
51436
|
68 |
byte dirtyCardValue = getConstant("CardTable::dirty_card", Byte.class);
|
|
69 |
byte g1YoungCardValue = getConstant("G1CardTable::g1_young_gen", Byte.class);
|
49873
|
70 |
|
|
71 |
// JDK-8201318
|
51436
|
72 |
int g1SATBQueueMarkingOffset = getConstant("G1ThreadLocalData::satb_mark_queue_active_offset", Integer.class);
|
|
73 |
int g1SATBQueueIndexOffset = getConstant("G1ThreadLocalData::satb_mark_queue_index_offset", Integer.class);
|
|
74 |
int g1SATBQueueBufferOffset = getConstant("G1ThreadLocalData::satb_mark_queue_buffer_offset", Integer.class);
|
|
75 |
int g1CardQueueIndexOffset = getConstant("G1ThreadLocalData::dirty_card_queue_index_offset", Integer.class);
|
|
76 |
int g1CardQueueBufferOffset = getConstant("G1ThreadLocalData::dirty_card_queue_buffer_offset", Integer.class);
|
49873
|
77 |
|
|
78 |
// JDK-8033552
|
51436
|
79 |
long heapTopAddress = getFieldValue("CompilerToVM::Data::_heap_top_addr", Long.class, "HeapWord* volatile*");
|
49873
|
80 |
|
|
81 |
// JDK-8015774
|
51436
|
82 |
long codeCacheLowBound = getFieldValue("CodeCache::_low_bound", Long.class, "address");
|
|
83 |
long codeCacheHighBound = getFieldValue("CodeCache::_high_bound", Long.class, "address");
|
58299
|
84 |
|
|
85 |
// JDK-8229258
|
|
86 |
String markWordClassName = "markWord";
|
|
87 |
String markWordFieldType = "markWord";
|
|
88 |
|
|
89 |
// JDK-8186777
|
|
90 |
int classMirrorOffset = getFieldOffset("Klass::_java_mirror", Integer.class, "OopHandle");
|
|
91 |
boolean classMirrorIsHandle = true;
|
49873
|
92 |
}
|