author | iveresov |
Wed, 20 Jun 2018 17:30:43 -0700 | |
changeset 50689 | 070b5313b2fe |
parent 50609 | bf414874c28f |
child 50858 | 2d3e99a72541 |
permissions | -rw-r--r-- |
49873 | 1 |
/* |
2 |
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. |
|
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 |
*/ |
|
23 |
package org.graalvm.compiler.hotspot; |
|
24 |
||
25 |
import jdk.vm.ci.hotspot.HotSpotVMConfigAccess; |
|
26 |
import jdk.vm.ci.hotspot.HotSpotVMConfigStore; |
|
27 |
||
28 |
/** |
|
29 |
* This is a source with different versions for various JDKs. When modifying/adding a field in this |
|
30 |
* class accessed from outside this class, be sure to update the field appropriately in all source |
|
31 |
* files named {@code GraalHotSpotVMConfigVersioned.java}. |
|
32 |
* |
|
33 |
* Fields are grouped according to the most recent JBS issue showing why they are versioned. |
|
34 |
* |
|
35 |
* JDK Version: 11+ |
|
36 |
*/ |
|
37 |
final class GraalHotSpotVMConfigVersioned extends HotSpotVMConfigAccess { |
|
38 |
||
39 |
GraalHotSpotVMConfigVersioned(HotSpotVMConfigStore store) { |
|
40 |
super(store); |
|
41 |
} |
|
42 |
||
50609 | 43 |
private boolean initInlineNotify() { |
44 |
String syncKnobs = getFlag("SyncKnobs", String.class, ""); |
|
45 |
return syncKnobs == null || !syncKnobs.contains("InlineNotify=0"); |
|
46 |
} |
|
47 |
||
50330 | 48 |
// JSK-8132287 |
50609 | 49 |
final boolean inlineNotify = initInlineNotify(); |
50330 | 50 |
|
49873 | 51 |
// JDK-8073583 |
52 |
final boolean useCRC32CIntrinsics = getFlag("UseCRC32CIntrinsics", Boolean.class); |
|
53 |
||
54 |
// JDK-8046936 |
|
55 |
final int javaThreadReservedStackActivationOffset = getFieldOffset("JavaThread::_reserved_stack_activation", Integer.class, "address"); |
|
56 |
final int methodFlagsOffset = getFieldOffset("Method::_flags", Integer.class, "u2"); |
|
57 |
final long throwDelayedStackOverflowErrorEntry = getFieldValue("StubRoutines::_throw_delayed_StackOverflowError_entry", Long.class, "address"); |
|
58 |
final long enableStackReservedZoneAddress = getAddress("SharedRuntime::enable_stack_reserved_zone"); |
|
59 |
||
60 |
// JDK-8135085 |
|
61 |
final int methodIntrinsicIdOffset = getFieldOffset("Method::_intrinsic_id", Integer.class, "u2"); |
|
62 |
||
63 |
// JDK-8151956 |
|
64 |
final int methodCodeOffset = getFieldOffset("Method::_code", Integer.class, "CompiledMethod*"); |
|
65 |
||
66 |
// JDK-8059606 |
|
67 |
final int invocationCounterIncrement = getConstant("InvocationCounter::count_increment", Integer.class); |
|
68 |
final int invocationCounterShift = getConstant("InvocationCounter::count_shift", Integer.class); |
|
69 |
||
70 |
// JDK-8195142 |
|
71 |
final byte dirtyCardValue = getConstant("CardTable::dirty_card", Byte.class); |
|
72 |
final byte g1YoungCardValue = getConstant("G1CardTable::g1_young_gen", Byte.class); |
|
73 |
||
74 |
// JDK-8201318 |
|
75 |
final int g1SATBQueueMarkingOffset = getConstant("G1ThreadLocalData::satb_mark_queue_active_offset", Integer.class); |
|
76 |
final int g1SATBQueueIndexOffset = getConstant("G1ThreadLocalData::satb_mark_queue_index_offset", Integer.class); |
|
77 |
final int g1SATBQueueBufferOffset = getConstant("G1ThreadLocalData::satb_mark_queue_buffer_offset", Integer.class); |
|
78 |
final int g1CardQueueIndexOffset = getConstant("G1ThreadLocalData::dirty_card_queue_index_offset", Integer.class); |
|
79 |
final int g1CardQueueBufferOffset = getConstant("G1ThreadLocalData::dirty_card_queue_buffer_offset", Integer.class); |
|
80 |
||
81 |
// JDK-8033552 |
|
82 |
final long heapTopAddress = getFieldValue("CompilerToVM::Data::_heap_top_addr", Long.class, "HeapWord* volatile*"); |
|
83 |
||
84 |
// JDK-8015774 |
|
85 |
final long codeCacheLowBound = getFieldValue("CodeCache::_low_bound", Long.class, "address"); |
|
86 |
final long codeCacheHighBound = getFieldValue("CodeCache::_high_bound", Long.class, "address"); |
|
50689
070b5313b2fe
8205105: VM crashes with "assert(Universe::heap()->is_in_reserved(start + words - 1)) failed: not in heap"
iveresov
parents:
50609
diff
changeset
|
87 |
|
070b5313b2fe
8205105: VM crashes with "assert(Universe::heap()->is_in_reserved(start + words - 1)) failed: not in heap"
iveresov
parents:
50609
diff
changeset
|
88 |
// JDK-8205105 |
070b5313b2fe
8205105: VM crashes with "assert(Universe::heap()->is_in_reserved(start + words - 1)) failed: not in heap"
iveresov
parents:
50609
diff
changeset
|
89 |
boolean useFastTLABRefill = false; |
49873 | 90 |
} |