Mercurial > hg > graal-jvmci-8
annotate jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java @ 23989:115d4e0d7b87
removed HotSpotResolvedJavaFieldImpl.name field
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 26 Jan 2017 13:02:37 +0100 |
parents | c64c9fac1ab9 |
children | ebce30b702eb |
rev | line source |
---|---|
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
23322
f8178417d018
Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents:
23309
diff
changeset
|
2 * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 * questions. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 */ |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22582
diff
changeset
|
23 package jdk.vm.ci.hotspot; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 |
23703
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
25 import static jdk.vm.ci.hotspot.UnsafeAccess.UNSAFE; |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
26 |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
27 import sun.misc.Unsafe; |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
28 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
29 /** |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
30 * Used to access native configuration details. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
31 */ |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
32 class HotSpotVMConfig extends HotSpotVMConfigAccess { |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
33 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
34 static HotSpotVMConfig config() { |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
35 return HotSpotJVMCIRuntime.runtime().getConfig(); |
22563
c345ad3a1cbb
added static accessor for HotSpotVMConfig object in singleton HotSpotJVMCIRuntime instance
Doug Simon <doug.simon@oracle.com>
parents:
22542
diff
changeset
|
36 } |
c345ad3a1cbb
added static accessor for HotSpotVMConfig object in singleton HotSpotJVMCIRuntime instance
Doug Simon <doug.simon@oracle.com>
parents:
22542
diff
changeset
|
37 |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
38 private final String osArch = getHostArchitectureName(); |
18652
dfacef5b7958
remove uses of Unsafe in HotSpotVMConfig methods that may be executed on a deserialized HotSpotVMConfig object
Doug Simon <doug.simon@oracle.com>
parents:
18589
diff
changeset
|
39 |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
40 @SuppressWarnings("try") |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
41 HotSpotVMConfig(HotSpotVMConfigStore store) { |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
42 super(store); |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
43 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
44 |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
45 /** |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
46 * Gets the host architecture name for the purpose of finding the corresponding |
21552
9579a3c62a9e
use skeleton findbugs jar containing only SuppresFBWarnings to avoid external dependency for JVMCI classes (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21414
diff
changeset
|
47 * {@linkplain HotSpotJVMCIBackendFactory backend}. |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
48 */ |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
49 String getHostArchitectureName() { |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
50 String arch = System.getProperty("os.arch"); |
23700
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23686
diff
changeset
|
51 if (arch.equals("x86_64")) { |
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23686
diff
changeset
|
52 arch = "amd64"; |
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23686
diff
changeset
|
53 } else if (arch.equals("sparcv9")) { |
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23686
diff
changeset
|
54 arch = "sparc"; |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
55 } |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
56 return arch; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
57 } |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
58 |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
59 private final Integer amd64RequiredInt = osArch.equals("amd64") ? null : 0; |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
60 |
9883
477fb9a9a06d
Delegate compressed oop arguments from HotSpot to Graal
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
9820
diff
changeset
|
61 // Compressed Oops related values. |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
62 final boolean useCompressedOops = getFlag("UseCompressedOops", Boolean.class); |
9189
0331f7512be2
CPU capability detection.
Roland Schatz <roland.schatz@oracle.com>
parents:
9108
diff
changeset
|
63 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
64 final int prototypeMarkWordOffset = getFieldOffset("Klass::_prototype_header", Integer.class, "markOop"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
65 final int subklassOffset = getFieldOffset("Klass::_subklass", Integer.class, "Klass*"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
66 final int nextSiblingOffset = getFieldOffset("Klass::_next_sibling", Integer.class, "Klass*"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
67 final int superCheckOffsetOffset = getFieldOffset("Klass::_super_check_offset", Integer.class, "juint"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
68 final int secondarySuperCacheOffset = getFieldOffset("Klass::_secondary_super_cache", Integer.class, "Klass*"); |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22679
diff
changeset
|
69 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
70 final int classMirrorOffset = getFieldOffset("Klass::_java_mirror", Integer.class, "oop"); |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
71 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
72 final int klassAccessFlagsOffset = getFieldOffset("Klass::_access_flags", Integer.class, "AccessFlags"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
73 final int klassLayoutHelperOffset = getFieldOffset("Klass::_layout_helper", Integer.class, "jint"); |
14012 | 74 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
75 final int klassLayoutHelperNeutralValue = getConstant("Klass::_lh_neutral_value", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
76 final int klassLayoutHelperInstanceSlowPathBit = getConstant("Klass::_lh_instance_slow_path_bit", Integer.class); |
14012 | 77 |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
78 final int arrayKlassComponentMirrorOffset = getFieldOffset("ArrayKlass::_component_mirror", Integer.class, "oop"); |
14012 | 79 |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
80 final int vtableEntrySize = getTypeSize("vtableEntry"); |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
81 final int vtableEntryMethodOffset = getFieldOffset("vtableEntry::_method", Integer.class, "Method*"); |
22540
df2764d92a3c
Renames to be more consistent with jvmci-9
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22529
diff
changeset
|
82 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
83 final int arrayU1LengthOffset = getFieldOffset("Array<int>::_length", Integer.class, "int"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
84 final int arrayU1DataOffset = getFieldOffset("Array<u1>::_data", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
85 final int arrayU2DataOffset = getFieldOffset("Array<u2>::_data", Integer.class); |
14012 | 86 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
87 final int instanceKlassSourceFileNameIndexOffset = getFieldOffset("InstanceKlass::_source_file_name_index", Integer.class, "u2"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
88 final int instanceKlassInitStateOffset = getFieldOffset("InstanceKlass::_init_state", Integer.class, "u1"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
89 final int instanceKlassConstantsOffset = getFieldOffset("InstanceKlass::_constants", Integer.class, "ConstantPool*"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
90 final int instanceKlassFieldsOffset = getFieldOffset("InstanceKlass::_fields", Integer.class, "Array<u2>*"); |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
91 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
92 final int instanceKlassStateLinked = getConstant("InstanceKlass::linked", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
93 final int instanceKlassStateFullyInitialized = getConstant("InstanceKlass::fully_initialized", Integer.class); |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
94 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
95 final int fieldInfoAccessFlagsOffset = getConstant("FieldInfo::access_flags_offset", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
96 final int fieldInfoNameIndexOffset = getConstant("FieldInfo::name_index_offset", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
97 final int fieldInfoSignatureIndexOffset = getConstant("FieldInfo::signature_index_offset", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
98 final int fieldInfoLowPackedOffset = getConstant("FieldInfo::low_packed_offset", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
99 final int fieldInfoHighPackedOffset = getConstant("FieldInfo::high_packed_offset", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
100 final int fieldInfoFieldSlots = getConstant("FieldInfo::field_slots", Integer.class); |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
101 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
102 final int fieldInfoTagSize = getConstant("FIELDINFO_TAG_SIZE", Integer.class); |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
103 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
104 final int jvmAccFieldInternal = getConstant("JVM_ACC_FIELD_INTERNAL", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
105 final int jvmAccFieldStable = getConstant("JVM_ACC_FIELD_STABLE", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
106 final int jvmAccFieldHasGenericSignature = getConstant("JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
107 final int jvmAccIsCloneable = getConstant("JVM_ACC_IS_CLONEABLE", Integer.class); |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
108 |
23749
d6bd0b9cd0b6
remove uses of setAccessible (JDK-8165434)
Doug Simon <doug.simon@oracle.com>
parents:
23728
diff
changeset
|
109 // These modifiers are not public in Modifier so we get them via vmStructs. |
d6bd0b9cd0b6
remove uses of setAccessible (JDK-8165434)
Doug Simon <doug.simon@oracle.com>
parents:
23728
diff
changeset
|
110 final int jvmAccSynthetic = getConstant("JVM_ACC_SYNTHETIC", Integer.class); |
d6bd0b9cd0b6
remove uses of setAccessible (JDK-8165434)
Doug Simon <doug.simon@oracle.com>
parents:
23728
diff
changeset
|
111 final int jvmAccAnnotation = getConstant("JVM_ACC_ANNOTATION", Integer.class); |
d6bd0b9cd0b6
remove uses of setAccessible (JDK-8165434)
Doug Simon <doug.simon@oracle.com>
parents:
23728
diff
changeset
|
112 final int jvmAccBridge = getConstant("JVM_ACC_BRIDGE", Integer.class); |
d6bd0b9cd0b6
remove uses of setAccessible (JDK-8165434)
Doug Simon <doug.simon@oracle.com>
parents:
23728
diff
changeset
|
113 final int jvmAccVarargs = getConstant("JVM_ACC_VARARGS", Integer.class); |
d6bd0b9cd0b6
remove uses of setAccessible (JDK-8165434)
Doug Simon <doug.simon@oracle.com>
parents:
23728
diff
changeset
|
114 final int jvmAccEnum = getConstant("JVM_ACC_ENUM", Integer.class); |
d6bd0b9cd0b6
remove uses of setAccessible (JDK-8165434)
Doug Simon <doug.simon@oracle.com>
parents:
23728
diff
changeset
|
115 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
116 final int runtimeCallStackSize = getConstant("frame::arg_reg_save_area_bytes", Integer.class, amd64RequiredInt); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
117 final int markWordNoHashInPlace = getConstant("markOopDesc::no_hash_in_place", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
118 final int markWordNoLockInPlace = getConstant("markOopDesc::no_lock_in_place", Integer.class); |
6386
abeeb57b655d
added MonitorSnippets which passes MonitorTest but is not yet enabled for general lowering
Doug Simon <doug.simon@oracle.com>
parents:
6375
diff
changeset
|
119 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
120 long arrayPrototypeMarkWord() { |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
121 return markWordNoHashInPlace | markWordNoLockInPlace; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
122 } |
6386
abeeb57b655d
added MonitorSnippets which passes MonitorTest but is not yet enabled for general lowering
Doug Simon <doug.simon@oracle.com>
parents:
6375
diff
changeset
|
123 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
124 final int methodAccessFlagsOffset = getFieldOffset("Method::_access_flags", Integer.class, "AccessFlags"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
125 final int methodConstMethodOffset = getFieldOffset("Method::_constMethod", Integer.class, "ConstMethod*"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
126 final int methodIntrinsicIdOffset = getFieldOffset("Method::_intrinsic_id", Integer.class, "u1"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
127 final int methodFlagsOffset = getFieldOffset("Method::_flags", Integer.class, "u1"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
128 final int methodVtableIndexOffset = getFieldOffset("Method::_vtable_index", Integer.class, "int"); |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
129 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
130 final int methodFlagsCallerSensitive = getConstant("Method::_caller_sensitive", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
131 final int methodFlagsForceInline = getConstant("Method::_force_inline", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
132 final int methodFlagsDontInline = getConstant("Method::_dont_inline", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
133 final int nonvirtualVtableIndex = getConstant("Method::nonvirtual_vtable_index", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
134 final int invalidVtableIndex = getConstant("Method::invalid_vtable_index", Integer.class); |
10056
a323a9e20f9d
Fixed a few race conditions in the compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10026
diff
changeset
|
135 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
136 final int invocationEntryBci = getConstant("InvocationEntryBci", Integer.class); |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9693
diff
changeset
|
137 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
138 final int extraStackEntries = getFieldValue("CompilerToVM::Data::Method_extra_stack_entries", Integer.class, "int"); |
15463
a20be10ad437
made Graal work with the HotSpot compiler queue and compiler threads, enabled by -XX:-UseGraalCompilationQueue
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
139 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
140 final int constMethodConstantsOffset = getFieldOffset("ConstMethod::_constants", Integer.class, "ConstantPool*"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
141 final int constMethodFlagsOffset = getFieldOffset("ConstMethod::_flags", Integer.class, "u2"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
142 final int constMethodCodeSizeOffset = getFieldOffset("ConstMethod::_code_size", Integer.class, "u2"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
143 final int constMethodNameIndexOffset = getFieldOffset("ConstMethod::_name_index", Integer.class, "u2"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
144 final int constMethodSignatureIndexOffset = getFieldOffset("ConstMethod::_signature_index", Integer.class, "u2"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
145 final int constMethodMaxStackOffset = getFieldOffset("ConstMethod::_max_stack", Integer.class, "u2"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
146 final int methodMaxLocalsOffset = getFieldOffset("ConstMethod::_max_locals", Integer.class, "u2"); |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
147 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
148 final int constMethodHasLineNumberTable = getConstant("ConstMethod::_has_linenumber_table", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
149 final int constMethodHasLocalVariableTable = getConstant("ConstMethod::_has_localvariable_table", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
150 final int constMethodHasExceptionTable = getConstant("ConstMethod::_has_exception_table", Integer.class); |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
151 |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
152 final int exceptionTableElementSize = getTypeSize("ExceptionTableElement"); |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
153 final int exceptionTableElementStartPcOffset = getFieldOffset("ExceptionTableElement::start_pc", Integer.class, "u2"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
154 final int exceptionTableElementEndPcOffset = getFieldOffset("ExceptionTableElement::end_pc", Integer.class, "u2"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
155 final int exceptionTableElementHandlerPcOffset = getFieldOffset("ExceptionTableElement::handler_pc", Integer.class, "u2"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
156 final int exceptionTableElementCatchTypeIndexOffset = getFieldOffset("ExceptionTableElement::catch_type_index", Integer.class, "u2"); |
13305
a63d65b682a8
moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
twisti
parents:
13261
diff
changeset
|
157 |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
158 final int localVariableTableElementSize = getTypeSize("LocalVariableTableElement"); |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
159 final int localVariableTableElementStartBciOffset = getFieldOffset("LocalVariableTableElement::start_bci", Integer.class, "u2"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
160 final int localVariableTableElementLengthOffset = getFieldOffset("LocalVariableTableElement::length", Integer.class, "u2"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
161 final int localVariableTableElementNameCpIndexOffset = getFieldOffset("LocalVariableTableElement::name_cp_index", Integer.class, "u2"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
162 final int localVariableTableElementDescriptorCpIndexOffset = getFieldOffset("LocalVariableTableElement::descriptor_cp_index", Integer.class, "u2"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
163 final int localVariableTableElementSlotOffset = getFieldOffset("LocalVariableTableElement::slot", Integer.class, "u2"); |
13306
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
164 |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
165 final int constantPoolSize = getTypeSize("ConstantPool"); |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
166 final int constantPoolTagsOffset = getFieldOffset("ConstantPool::_tags", Integer.class, "Array<u1>*"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
167 final int constantPoolHolderOffset = getFieldOffset("ConstantPool::_pool_holder", Integer.class, "InstanceKlass*"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
168 final int constantPoolLengthOffset = getFieldOffset("ConstantPool::_length", Integer.class, "int"); |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
169 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
170 final int constantPoolCpCacheIndexTag = getConstant("ConstantPool::CPCACHE_INDEX_TAG", Integer.class); |
14052
361acb279104
moved to-constant-pool-index conversion up to Java
twisti
parents:
14051
diff
changeset
|
171 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
172 final int jvmConstantUtf8 = getConstant("JVM_CONSTANT_Utf8", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
173 final int jvmConstantInteger = getConstant("JVM_CONSTANT_Integer", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
174 final int jvmConstantLong = getConstant("JVM_CONSTANT_Long", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
175 final int jvmConstantFloat = getConstant("JVM_CONSTANT_Float", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
176 final int jvmConstantDouble = getConstant("JVM_CONSTANT_Double", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
177 final int jvmConstantClass = getConstant("JVM_CONSTANT_Class", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
178 final int jvmConstantUnresolvedClass = getConstant("JVM_CONSTANT_UnresolvedClass", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
179 final int jvmConstantUnresolvedClassInError = getConstant("JVM_CONSTANT_UnresolvedClassInError", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
180 final int jvmConstantString = getConstant("JVM_CONSTANT_String", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
181 final int jvmConstantFieldref = getConstant("JVM_CONSTANT_Fieldref", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
182 final int jvmConstantMethodref = getConstant("JVM_CONSTANT_Methodref", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
183 final int jvmConstantInterfaceMethodref = getConstant("JVM_CONSTANT_InterfaceMethodref", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
184 final int jvmConstantNameAndType = getConstant("JVM_CONSTANT_NameAndType", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
185 final int jvmConstantMethodHandle = getConstant("JVM_CONSTANT_MethodHandle", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
186 final int jvmConstantMethodHandleInError = getConstant("JVM_CONSTANT_MethodHandleInError", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
187 final int jvmConstantMethodType = getConstant("JVM_CONSTANT_MethodType", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
188 final int jvmConstantMethodTypeInError = getConstant("JVM_CONSTANT_MethodTypeInError", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
189 final int jvmConstantInvokeDynamic = getConstant("JVM_CONSTANT_InvokeDynamic", Integer.class); |
13254
42aaf7306707
Teach Graal about Symbol and ConstantPool so we can move more logic into Java. We'll see how that ends...
twisti
parents:
13252
diff
changeset
|
190 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
191 final int jvmConstantExternalMax = getConstant("JVM_CONSTANT_ExternalMax", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
192 final int jvmConstantInternalMin = getConstant("JVM_CONSTANT_InternalMin", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
193 final int jvmConstantInternalMax = getConstant("JVM_CONSTANT_InternalMax", Integer.class); |
17393
a8186c7f73e9
added table to speed up mapping JVM_CONSTANT tag value to JVM_CONSTANT enum object
Doug Simon <doug.simon@oracle.com>
parents:
17144
diff
changeset
|
194 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
195 final int heapWordSize = getConstant("HeapWordSize", Integer.class); |
13933
ebd2dfc2b780
use hotspot stubs for primitive arraycopy calls
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13897
diff
changeset
|
196 |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
197 final int symbolPointerSize = getTypeSize("Symbol*"); |
9562
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9519
diff
changeset
|
198 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
199 final long vmSymbolsSymbols = getFieldAddress("vmSymbols::_symbols[0]", "Symbol*"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
200 final int vmSymbolsFirstSID = getConstant("vmSymbols::FIRST_SID", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
201 final int vmSymbolsSIDLimit = getConstant("vmSymbols::SID_LIMIT", Integer.class); |
13818
d2f520f46180
added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
13776
diff
changeset
|
202 |
23703
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
203 /** |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
204 * Returns the symbol in the {@code vmSymbols} table at position {@code index} as a |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
205 * {@link String}. |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
206 * |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
207 * @param index position in the symbol table |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
208 * @return the symbol at position id |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
209 */ |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
210 String symbolAt(int index) { |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
211 HotSpotJVMCIRuntime runtime = HotSpotJVMCIRuntime.runtime(); |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
212 assert vmSymbolsFirstSID <= index && index < vmSymbolsSIDLimit : "index " + index + " is out of bounds"; |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
213 assert symbolPointerSize == Unsafe.ADDRESS_SIZE : "the following address read is broken"; |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
214 int offset = index * symbolPointerSize; |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
215 return runtime.getCompilerToVM().getSymbol(UNSAFE.getAddress(vmSymbolsSymbols + offset)); |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
216 } |
9ac04c6047c8
sync with jdk9 changes for JDK-8159613
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
217 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
218 final int klassHasFinalizerFlag = getConstant("JVM_ACC_HAS_FINALIZER", Integer.class); |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
219 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
220 // Modifier.SYNTHETIC is not so we get it via vmStructs. |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
221 final int syntheticFlag = getConstant("JVM_ACC_SYNTHETIC", Integer.class); |
13818
d2f520f46180
added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
13776
diff
changeset
|
222 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
223 final int klassVtableStartOffset = getFieldValue("CompilerToVM::Data::Klass_vtable_start_offset", Integer.class, "int"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
224 final int klassVtableLengthOffset = getFieldValue("CompilerToVM::Data::Klass_vtable_length_offset", Integer.class, "int"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
225 final int universeBaseVtableSize = getFieldValue("CompilerToVM::Data::Universe_base_vtable_size", Integer.class, "int"); |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
226 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
227 final int baseVtableLength() { |
23728
995af926c06b
Fixed vtable size computation in HotSpotVMConfig and add test
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23706
diff
changeset
|
228 return universeBaseVtableSize / (vtableEntrySize / heapWordSize); |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23677
diff
changeset
|
229 } |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
230 |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
231 final int klassOffset = getFieldValue("java_lang_Class::_klass_offset", Integer.class, "int"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
232 |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
233 final int methodDataOffset = getFieldOffset("Method::_method_data", Integer.class, "MethodData*"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
234 final int methodCodeOffset = getFieldOffset("Method::_code", Integer.class, "nmethod*"); |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
235 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
236 final int methodDataSize = getFieldOffset("MethodData::_size", Integer.class, "int"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
237 final int methodDataDataSize = getFieldOffset("MethodData::_data_size", Integer.class, "int"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
238 final int methodDataOopDataOffset = getFieldOffset("MethodData::_data[0]", Integer.class, "intptr_t"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
239 final int methodDataOopTrapHistoryOffset = getFieldOffset("MethodData::_trap_hist._array[0]", Integer.class, "u1"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
240 final int methodDataIRSizeOffset = getFieldOffset("MethodData::_jvmci_ir_size", Integer.class, "int"); |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
241 |
23765
c64c9fac1ab9
Expose decompile counts in MDO
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23749
diff
changeset
|
242 final int methodDataDecompiles = getFieldOffset("MethodData::_nof_decompiles", Integer.class, "uint"); |
c64c9fac1ab9
Expose decompile counts in MDO
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23749
diff
changeset
|
243 final int methodDataOverflowRecompiles = getFieldOffset("MethodData::_nof_overflow_recompiles", Integer.class, "uint"); |
c64c9fac1ab9
Expose decompile counts in MDO
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23749
diff
changeset
|
244 final int methodDataOverflowTraps = getFieldOffset("MethodData::_nof_overflow_traps", Integer.class, "uint"); |
c64c9fac1ab9
Expose decompile counts in MDO
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23749
diff
changeset
|
245 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
246 final int nmethodCompLevelOffset = getFieldOffset("nmethod::_comp_level", Integer.class, "int"); |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
247 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
248 final int compilationLevelNone = getConstant("CompLevel_none", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
249 final int compilationLevelSimple = getConstant("CompLevel_simple", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
250 final int compilationLevelLimitedProfile = getConstant("CompLevel_limited_profile", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
251 final int compilationLevelFullProfile = getConstant("CompLevel_full_profile", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
252 final int compilationLevelFullOptimization = getConstant("CompLevel_full_optimization", Integer.class); |
13241 | 253 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
254 final int compLevelAdjustmentNone = getConstant("JVMCIRuntime::none", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
255 final int compLevelAdjustmentByHolder = getConstant("JVMCIRuntime::by_holder", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
256 final int compLevelAdjustmentByFullSignature = getConstant("JVMCIRuntime::by_full_signature", Integer.class); |
23379
24505bf61633
allow JVMCI compiler to change the compilation policy for a method (JDK-8152311)
Doug Simon <doug.simon@oracle.com>
parents:
23357
diff
changeset
|
257 |
23674
09a536b9233c
8158850: [JVMCI] be more precise when enforcing OopMapValue encoding limitations
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23393
diff
changeset
|
258 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
259 * The DataLayout header size is the same as the cell size. |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
260 */ |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
261 final int dataLayoutHeaderSize = getConstant("DataLayout::cell_size", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
262 final int dataLayoutTagOffset = getFieldOffset("DataLayout::_header._struct._tag", Integer.class, "u1"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
263 final int dataLayoutFlagsOffset = getFieldOffset("DataLayout::_header._struct._flags", Integer.class, "u1"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
264 final int dataLayoutBCIOffset = getFieldOffset("DataLayout::_header._struct._bci", Integer.class, "u2"); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
265 final int dataLayoutCellSize = getConstant("DataLayout::cell_size", Integer.class); |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
266 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
267 final int dataLayoutNoTag = getConstant("DataLayout::no_tag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
268 final int dataLayoutBitDataTag = getConstant("DataLayout::bit_data_tag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
269 final int dataLayoutCounterDataTag = getConstant("DataLayout::counter_data_tag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
270 final int dataLayoutJumpDataTag = getConstant("DataLayout::jump_data_tag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
271 final int dataLayoutReceiverTypeDataTag = getConstant("DataLayout::receiver_type_data_tag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
272 final int dataLayoutVirtualCallDataTag = getConstant("DataLayout::virtual_call_data_tag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
273 final int dataLayoutRetDataTag = getConstant("DataLayout::ret_data_tag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
274 final int dataLayoutBranchDataTag = getConstant("DataLayout::branch_data_tag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
275 final int dataLayoutMultiBranchDataTag = getConstant("DataLayout::multi_branch_data_tag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
276 final int dataLayoutArgInfoDataTag = getConstant("DataLayout::arg_info_data_tag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
277 final int dataLayoutCallTypeDataTag = getConstant("DataLayout::call_type_data_tag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
278 final int dataLayoutVirtualCallTypeDataTag = getConstant("DataLayout::virtual_call_type_data_tag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
279 final int dataLayoutParametersTypeDataTag = getConstant("DataLayout::parameters_type_data_tag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
280 final int dataLayoutSpeculativeTrapDataTag = getConstant("DataLayout::speculative_trap_data_tag", Integer.class); |
6521
2a0c9f20baa1
consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
6494
diff
changeset
|
281 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
282 final int bciProfileWidth = getFlag("BciProfileWidth", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
283 final int typeProfileWidth = getFlag("TypeProfileWidth", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
284 final int methodProfileWidth = getFlag("MethodProfileWidth", Integer.class); |
13933
ebd2dfc2b780
use hotspot stubs for primitive arraycopy calls
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13897
diff
changeset
|
285 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
286 final int deoptReasonNone = getConstant("Deoptimization::Reason_none", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
287 final int deoptReasonNullCheck = getConstant("Deoptimization::Reason_null_check", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
288 final int deoptReasonRangeCheck = getConstant("Deoptimization::Reason_range_check", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
289 final int deoptReasonClassCheck = getConstant("Deoptimization::Reason_class_check", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
290 final int deoptReasonArrayCheck = getConstant("Deoptimization::Reason_array_check", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
291 final int deoptReasonUnreached0 = getConstant("Deoptimization::Reason_unreached0", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
292 final int deoptReasonTypeCheckInlining = getConstant("Deoptimization::Reason_type_checked_inlining", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
293 final int deoptReasonOptimizedTypeCheck = getConstant("Deoptimization::Reason_optimized_type_check", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
294 final int deoptReasonNotCompiledExceptionHandler = getConstant("Deoptimization::Reason_not_compiled_exception_handler", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
295 final int deoptReasonUnresolved = getConstant("Deoptimization::Reason_unresolved", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
296 final int deoptReasonJsrMismatch = getConstant("Deoptimization::Reason_jsr_mismatch", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
297 final int deoptReasonDiv0Check = getConstant("Deoptimization::Reason_div0_check", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
298 final int deoptReasonConstraint = getConstant("Deoptimization::Reason_constraint", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
299 final int deoptReasonLoopLimitCheck = getConstant("Deoptimization::Reason_loop_limit_check", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
300 final int deoptReasonAliasing = getConstant("Deoptimization::Reason_aliasing", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
301 final int deoptReasonTransferToInterpreter = getConstant("Deoptimization::Reason_transfer_to_interpreter", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
302 final int deoptReasonOSROffset = getConstant("Deoptimization::Reason_LIMIT", Integer.class); |
15104 | 303 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
304 final int deoptActionNone = getConstant("Deoptimization::Action_none", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
305 final int deoptActionMaybeRecompile = getConstant("Deoptimization::Action_maybe_recompile", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
306 final int deoptActionReinterpret = getConstant("Deoptimization::Action_reinterpret", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
307 final int deoptActionMakeNotEntrant = getConstant("Deoptimization::Action_make_not_entrant", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
308 final int deoptActionMakeNotCompilable = getConstant("Deoptimization::Action_make_not_compilable", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
309 |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
310 final int deoptimizationActionBits = getConstant("Deoptimization::_action_bits", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
311 final int deoptimizationReasonBits = getConstant("Deoptimization::_reason_bits", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
312 final int deoptimizationDebugIdBits = getConstant("Deoptimization::_debug_id_bits", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
313 final int deoptimizationActionShift = getConstant("Deoptimization::_action_shift", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
314 final int deoptimizationReasonShift = getConstant("Deoptimization::_reason_shift", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
315 final int deoptimizationDebugIdShift = getConstant("Deoptimization::_debug_id_shift", Integer.class); |
7154
5d0bb7d52783
changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
Doug Simon <doug.simon@oracle.com>
parents:
7147
diff
changeset
|
316 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
317 final int vmIntrinsicInvokeBasic = getConstant("vmIntrinsics::_invokeBasic", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
318 final int vmIntrinsicLinkToVirtual = getConstant("vmIntrinsics::_linkToVirtual", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
319 final int vmIntrinsicLinkToStatic = getConstant("vmIntrinsics::_linkToStatic", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
320 final int vmIntrinsicLinkToSpecial = getConstant("vmIntrinsics::_linkToSpecial", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
321 final int vmIntrinsicLinkToInterface = getConstant("vmIntrinsics::_linkToInterface", Integer.class); |
15104 | 322 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
323 final int codeInstallResultOk = getConstant("JVMCIEnv::ok", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
324 final int codeInstallResultDependenciesFailed = getConstant("JVMCIEnv::dependencies_failed", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
325 final int codeInstallResultDependenciesInvalid = getConstant("JVMCIEnv::dependencies_invalid", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
326 final int codeInstallResultCacheFull = getConstant("JVMCIEnv::cache_full", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
327 final int codeInstallResultCodeTooLarge = getConstant("JVMCIEnv::code_too_large", Integer.class); |
13170
f294b4ee2d47
make CodeInstallResult enum independent of the actual values in C++ code
twisti
parents:
13155
diff
changeset
|
328 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
329 String getCodeInstallResultDescription(int codeInstallResult) { |
21414
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
330 if (codeInstallResult == codeInstallResultOk) { |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
331 return "ok"; |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
332 } |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
333 if (codeInstallResult == codeInstallResultDependenciesFailed) { |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
334 return "dependencies failed"; |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
335 } |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
336 if (codeInstallResult == codeInstallResultDependenciesInvalid) { |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
337 return "dependencies invalid"; |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
338 } |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
339 if (codeInstallResult == codeInstallResultCacheFull) { |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
340 return "code cache is full"; |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
341 } |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
342 if (codeInstallResult == codeInstallResultCodeTooLarge) { |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
343 return "code is too large"; |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
344 } |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
345 assert false : codeInstallResult; |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
346 return "unknown"; |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
347 } |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
348 |
23680
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
349 final int bitDataExceptionSeenFlag = getConstant("BitData::exception_seen_flag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
350 final int bitDataNullSeenFlag = getConstant("BitData::null_seen_flag", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
351 final int methodDataCountOffset = getConstant("CounterData::count_off", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
352 final int jumpDataTakenOffset = getConstant("JumpData::taken_off_set", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
353 final int jumpDataDisplacementOffset = getConstant("JumpData::displacement_off_set", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
354 final int receiverTypeDataNonprofiledCountOffset = getConstant("ReceiverTypeData::nonprofiled_count_off_set", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
355 final int receiverTypeDataReceiverTypeRowCellCount = getConstant("ReceiverTypeData::receiver_type_row_cell_count", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
356 final int receiverTypeDataReceiver0Offset = getConstant("ReceiverTypeData::receiver0_offset", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
357 final int receiverTypeDataCount0Offset = getConstant("ReceiverTypeData::count0_offset", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
358 final int branchDataNotTakenOffset = getConstant("BranchData::not_taken_off_set", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
359 final int arrayDataArrayLenOffset = getConstant("ArrayData::array_len_off_set", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
360 final int arrayDataArrayStartOffset = getConstant("ArrayData::array_start_off_set", Integer.class); |
9861ec1f28c9
removed commented code (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
361 final int multiBranchDataPerCaseCellCount = getConstant("MultiBranchData::per_case_cell_count", Integer.class); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
362 } |