Mercurial > hg > graal-compiler
annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java @ 13641:5a9afbf72714
Add a speculation oop for uncommon trap deoptimization. Save it in the SpeculationLog during deoptimization.
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Thu, 12 Dec 2013 15:13:02 +0100 |
parents | bfe7a8c8c3c6 |
children | 8305aec3a1ae |
rev | line source |
---|---|
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
8996
6d86ce1297bc
GRAAL-213: add HotSpot-style PrintCompilation and PrintInlining
twisti
parents:
8513
diff
changeset
|
2 * Copyright (c) 2011, 2013, 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 */ |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
23 package com.oracle.graal.hotspot; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
25 import static com.oracle.graal.graph.UnsafeAccess.*; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
26 |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
27 import java.lang.reflect.*; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
28 import java.util.*; |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
29 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
30 import com.oracle.graal.graph.*; |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
31 import com.oracle.graal.hotspot.bridge.*; |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
32 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
33 /** |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
34 * Used to access native configuration details. |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
35 * |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
36 * All non-static, public fields in this class are so that they can be compiled as constants. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
37 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
38 public class HotSpotVMConfig extends CompilerObject { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
39 |
4142
bc8527f3071c
Adjust code base to new level of warnings.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3733
diff
changeset
|
40 private static final long serialVersionUID = -4744897993263044184L; |
bc8527f3071c
Adjust code base to new level of warnings.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3733
diff
changeset
|
41 |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
42 private static boolean containsString(String[] array, String item) { |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
43 if (array == null) { |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
44 return false; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
45 } |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
46 for (String arch : array) { |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
47 if (arch.equals(item)) { |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
48 return true; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
49 } |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
50 } |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
51 return false; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
52 } |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
53 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
54 HotSpotVMConfig(CompilerToVM compilerToVm) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
55 compilerToVm.initializeConfiguration(this); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
56 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
57 // Fill the VM fields hash map. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
58 HashMap<String, VMFields.Field> vmFields = new HashMap<>(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
59 for (VMFields.Field e : new VMFields(gHotSpotVMStructs)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
60 vmFields.put(e.getName(), e); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
61 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
62 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
63 // Fill the VM types hash map. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
64 HashMap<String, VMTypes.Type> vmTypes = new HashMap<>(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
65 for (VMTypes.Type e : new VMTypes(gHotSpotVMTypes)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
66 vmTypes.put(e.getTypeName(), e); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
67 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
68 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
69 // Fill the VM constants hash map. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
70 HashMap<String, AbstractConstant> vmConstants = new HashMap<>(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
71 for (AbstractConstant e : new VMIntConstants(gHotSpotVMIntConstants)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
72 vmConstants.put(e.getName(), e); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
73 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
74 for (AbstractConstant e : new VMLongConstants(gHotSpotVMLongConstants)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
75 vmConstants.put(e.getName(), e); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
76 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
77 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
78 // Fill the flags hash map. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
79 HashMap<String, Flags.Flag> flags = new HashMap<>(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
80 for (Flags.Flag e : new Flags(vmFields, vmTypes)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
81 flags.put(e.getName(), e); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
82 } |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
83 |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
84 String currentArch = getHostArchitectureName(); |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
85 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
86 for (Field f : HotSpotVMConfig.class.getDeclaredFields()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
87 if (f.isAnnotationPresent(HotSpotVMField.class)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
88 HotSpotVMField annotation = f.getAnnotation(HotSpotVMField.class); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
89 String name = annotation.name(); |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
90 String type = annotation.type(); |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
91 VMFields.Field entry = vmFields.get(name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
92 if (entry == null) { |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
93 if (annotation.optional() || !containsString(annotation.archs(), currentArch)) { |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
94 continue; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
95 } |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
96 throw new IllegalArgumentException("field not found: " + name); |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
97 } |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
98 |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
99 // Make sure the native type is still the type we expect. |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
100 if (!type.equals("")) { |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
101 if (!type.equals(entry.getTypeString())) { |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
102 throw new IllegalArgumentException("compiler expects type " + type + " but field " + name + " is of type " + entry.getTypeString()); |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
103 } |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
104 } |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
105 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
106 switch (annotation.get()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
107 case OFFSET: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
108 setField(f, entry.getOffset()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
109 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
110 case ADDRESS: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
111 setField(f, entry.getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
112 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
113 case VALUE: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
114 setField(f, entry.getValue()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
115 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
116 default: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
117 throw GraalInternalError.shouldNotReachHere("unknown kind " + annotation.get()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
118 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
119 } else if (f.isAnnotationPresent(HotSpotVMType.class)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
120 HotSpotVMType annotation = f.getAnnotation(HotSpotVMType.class); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
121 String name = annotation.name(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
122 VMTypes.Type entry = vmTypes.get(name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
123 if (entry == null) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
124 throw new IllegalArgumentException("type not found: " + name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
125 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
126 switch (annotation.get()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
127 case SIZE: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
128 setField(f, entry.getSize()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
129 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
130 default: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
131 throw GraalInternalError.shouldNotReachHere("unknown kind " + annotation.get()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
132 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
133 } else if (f.isAnnotationPresent(HotSpotVMConstant.class)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
134 HotSpotVMConstant annotation = f.getAnnotation(HotSpotVMConstant.class); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
135 String name = annotation.name(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
136 AbstractConstant entry = vmConstants.get(name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
137 if (entry == null) { |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
138 if (!containsString(annotation.archs(), currentArch)) { |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
139 continue; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
140 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
141 throw new IllegalArgumentException("constant not found: " + name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
142 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
143 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
144 setField(f, entry.getValue()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
145 } else if (f.isAnnotationPresent(HotSpotVMFlag.class)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
146 HotSpotVMFlag annotation = f.getAnnotation(HotSpotVMFlag.class); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
147 String name = annotation.name(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
148 Flags.Flag entry = flags.get(name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
149 if (entry == null) { |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
150 if (annotation.optional() || !containsString(annotation.archs(), currentArch)) { |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
151 continue; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
152 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
153 throw new IllegalArgumentException("flag not found: " + name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
154 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
155 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
156 setField(f, entry.getValue()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
157 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
158 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
159 |
13520
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
160 oopEncoding = new CompressEncoding(narrowOopBase, narrowOopShift, logMinObjAlignment()); |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
161 klassEncoding = new CompressEncoding(narrowKlassBase, narrowKlassShift, logKlassAlignment); |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
162 |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
163 assert check(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
164 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
165 |
13520
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
166 private final CompressEncoding oopEncoding; |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
167 private final CompressEncoding klassEncoding; |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
168 |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
169 public CompressEncoding getOopEncoding() { |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
170 return oopEncoding; |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
171 } |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
172 |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
173 public CompressEncoding getKlassEncoding() { |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
174 return klassEncoding; |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
175 } |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
176 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
177 private void setField(Field field, Object value) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
178 try { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
179 Class<?> fieldType = field.getType(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
180 if (fieldType == boolean.class) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
181 if (value instanceof String) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
182 field.setBoolean(this, Boolean.valueOf((String) value)); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
183 } else if (value instanceof Boolean) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
184 field.setBoolean(this, (boolean) value); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
185 } else if (value instanceof Long) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
186 field.setBoolean(this, ((long) value) != 0); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
187 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
188 GraalInternalError.shouldNotReachHere(value.getClass().getSimpleName()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
189 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
190 } else if (fieldType == int.class) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
191 if (value instanceof Integer) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
192 field.setInt(this, (int) value); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
193 } else if (value instanceof Long) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
194 field.setInt(this, (int) (long) value); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
195 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
196 GraalInternalError.shouldNotReachHere(value.getClass().getSimpleName()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
197 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
198 } else if (fieldType == long.class) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
199 field.setLong(this, (long) value); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
200 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
201 GraalInternalError.shouldNotReachHere(field.toString()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
202 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
203 } catch (IllegalAccessException e) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
204 throw GraalInternalError.shouldNotReachHere(field.toString() + ": " + e); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
205 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
206 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
207 |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
208 /** |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
209 * Gets the host architecture name for the purpose of finding the corresponding |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
210 * {@linkplain HotSpotBackendFactory backend}. |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
211 */ |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
212 public String getHostArchitectureName() { |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
213 String arch = System.getProperty("os.arch"); |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
214 switch (arch) { |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
215 case "x86_64": |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
216 arch = "amd64"; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
217 break; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
218 case "sparcv9": |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
219 arch = "sparc"; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
220 break; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
221 } |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
222 return arch; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
223 } |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
224 |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
225 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
226 * VMStructEntry (see vmStructs.hpp). |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
227 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
228 private long gHotSpotVMStructs; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
229 private long gHotSpotVMStructEntryTypeNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
230 private long gHotSpotVMStructEntryFieldNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
231 private long gHotSpotVMStructEntryTypeStringOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
232 private long gHotSpotVMStructEntryIsStaticOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
233 private long gHotSpotVMStructEntryOffsetOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
234 private long gHotSpotVMStructEntryAddressOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
235 private long gHotSpotVMStructEntryArrayStride; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
236 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
237 class VMFields implements Iterable<VMFields.Field> { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
238 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
239 private long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
240 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
241 public VMFields(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
242 this.address = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
243 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
244 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
245 public Iterator<VMFields.Field> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
246 return new Iterator<VMFields.Field>() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
247 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
248 private int index = 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
249 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
250 private Field current() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
251 return new Field(address + gHotSpotVMStructEntryArrayStride * index); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
252 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
253 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
254 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
255 * The last entry is identified by a NULL fieldName. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
256 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
257 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
258 Field entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
259 return entry.getFieldName() != null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
260 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
261 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
262 public Field next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
263 Field entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
264 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
265 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
266 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
267 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
268 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
269 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
270 throw GraalInternalError.unimplemented(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
271 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
272 }; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
273 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
274 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
275 class Field { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
276 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
277 private long entryAddress; |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
278 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
279 Field(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
280 this.entryAddress = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
281 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
282 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
283 public String getTypeName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
284 long typeNameAddress = unsafe.getAddress(entryAddress + gHotSpotVMStructEntryTypeNameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
285 return readCStringAsString(typeNameAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
286 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
287 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
288 public String getFieldName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
289 long fieldNameAddress = unsafe.getAddress(entryAddress + gHotSpotVMStructEntryFieldNameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
290 return readCStringAsString(fieldNameAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
291 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
292 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
293 public String getTypeString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
294 long typeStringAddress = unsafe.getAddress(entryAddress + gHotSpotVMStructEntryTypeStringOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
295 return readCStringAsString(typeStringAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
296 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
297 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
298 public boolean isStatic() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
299 return unsafe.getInt(entryAddress + gHotSpotVMStructEntryIsStaticOffset) != 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
300 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
301 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
302 public long getOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
303 return unsafe.getLong(entryAddress + gHotSpotVMStructEntryOffsetOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
304 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
305 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
306 public long getAddress() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
307 return unsafe.getAddress(entryAddress + gHotSpotVMStructEntryAddressOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
308 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
309 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
310 public String getName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
311 String typeName = getTypeName(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
312 String fieldName = getFieldName(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
313 return typeName + "::" + fieldName; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
314 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
315 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
316 public long getValue() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
317 String type = getTypeString(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
318 switch (type) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
319 case "int": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
320 return unsafe.getInt(getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
321 case "address": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
322 case "intptr_t": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
323 return unsafe.getAddress(getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
324 default: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
325 // All foo* types are addresses. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
326 if (type.endsWith("*")) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
327 return unsafe.getAddress(getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
328 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
329 throw GraalInternalError.shouldNotReachHere(type); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
330 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
331 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
332 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
333 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
334 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
335 return String.format("Field[typeName=%s, fieldName=%s, typeString=%s, isStatic=%b, offset=%d, address=0x%x]", getTypeName(), getFieldName(), getTypeString(), isStatic(), getOffset(), |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
336 getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
337 } |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
338 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
339 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
340 |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
341 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
342 * VMTypeEntry (see vmStructs.hpp). |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
343 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
344 private long gHotSpotVMTypes; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
345 private long gHotSpotVMTypeEntryTypeNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
346 private long gHotSpotVMTypeEntrySuperclassNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
347 private long gHotSpotVMTypeEntryIsOopTypeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
348 private long gHotSpotVMTypeEntryIsIntegerTypeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
349 private long gHotSpotVMTypeEntryIsUnsignedOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
350 private long gHotSpotVMTypeEntrySizeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
351 private long gHotSpotVMTypeEntryArrayStride; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
352 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
353 class VMTypes implements Iterable<VMTypes.Type> { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
354 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
355 private long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
356 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
357 public VMTypes(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
358 this.address = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
359 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
360 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
361 public Iterator<VMTypes.Type> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
362 return new Iterator<VMTypes.Type>() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
363 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
364 private int index = 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
365 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
366 private Type current() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
367 return new Type(address + gHotSpotVMTypeEntryArrayStride * index); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
368 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
369 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
370 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
371 * The last entry is identified by a NULL type name. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
372 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
373 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
374 Type entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
375 return entry.getTypeName() != null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
376 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
377 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
378 public Type next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
379 Type entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
380 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
381 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
382 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
383 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
384 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
385 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
386 throw GraalInternalError.unimplemented(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
387 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
388 }; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
389 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
390 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
391 class Type { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
392 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
393 private long entryAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
394 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
395 Type(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
396 this.entryAddress = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
397 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
398 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
399 public String getTypeName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
400 long typeNameAddress = unsafe.getAddress(entryAddress + gHotSpotVMTypeEntryTypeNameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
401 return readCStringAsString(typeNameAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
402 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
403 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
404 public String getSuperclassName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
405 long superclassNameAddress = unsafe.getAddress(entryAddress + gHotSpotVMTypeEntrySuperclassNameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
406 return readCStringAsString(superclassNameAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
407 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
408 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
409 public boolean isOopType() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
410 return unsafe.getInt(entryAddress + gHotSpotVMTypeEntryIsOopTypeOffset) != 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
411 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
412 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
413 public boolean isIntegerType() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
414 return unsafe.getInt(entryAddress + gHotSpotVMTypeEntryIsIntegerTypeOffset) != 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
415 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
416 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
417 public boolean isUnsigned() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
418 return unsafe.getInt(entryAddress + gHotSpotVMTypeEntryIsUnsignedOffset) != 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
419 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
420 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
421 public long getSize() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
422 return unsafe.getLong(entryAddress + gHotSpotVMTypeEntrySizeOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
423 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
424 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
425 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
426 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
427 return String.format("Type[typeName=%s, superclassName=%s, isOopType=%b, isIntegerType=%b, isUnsigned=%b, size=%d]", getTypeName(), getSuperclassName(), isOopType(), isIntegerType(), |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
428 isUnsigned(), getSize()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
429 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
430 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
431 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
432 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
433 public abstract class AbstractConstant { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
434 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
435 protected long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
436 protected long nameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
437 protected long valueOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
438 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
439 AbstractConstant(long address, long nameOffset, long valueOffset) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
440 this.address = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
441 this.nameOffset = nameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
442 this.valueOffset = valueOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
443 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
444 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
445 public String getName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
446 long nameAddress = unsafe.getAddress(address + nameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
447 return readCStringAsString(nameAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
448 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
449 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
450 public abstract long getValue(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
451 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
452 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
453 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
454 * VMIntConstantEntry (see vmStructs.hpp). |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
455 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
456 private long gHotSpotVMIntConstants; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
457 private long gHotSpotVMIntConstantEntryNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
458 private long gHotSpotVMIntConstantEntryValueOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
459 private long gHotSpotVMIntConstantEntryArrayStride; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
460 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
461 class VMIntConstants implements Iterable<VMIntConstants.Constant> { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
462 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
463 private long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
464 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
465 public VMIntConstants(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
466 this.address = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
467 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
468 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
469 public Iterator<VMIntConstants.Constant> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
470 return new Iterator<VMIntConstants.Constant>() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
471 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
472 private int index = 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
473 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
474 private Constant current() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
475 return new Constant(address + gHotSpotVMIntConstantEntryArrayStride * index); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
476 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
477 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
478 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
479 * The last entry is identified by a NULL name. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
480 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
481 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
482 Constant entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
483 return entry.getName() != null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
484 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
485 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
486 public Constant next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
487 Constant entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
488 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
489 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
490 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
491 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
492 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
493 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
494 throw GraalInternalError.unimplemented(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
495 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
496 }; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
497 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
498 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
499 class Constant extends AbstractConstant { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
500 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
501 Constant(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
502 super(address, gHotSpotVMIntConstantEntryNameOffset, gHotSpotVMIntConstantEntryValueOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
503 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
504 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
505 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
506 public long getValue() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
507 return unsafe.getInt(address + valueOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
508 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
509 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
510 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
511 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
512 return String.format("IntConstant[name=%s, value=%d (0x%x)]", getName(), getValue(), getValue()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
513 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
514 } |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
515 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
516 |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
517 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
518 * VMLongConstantEntry (see vmStructs.hpp). |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
519 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
520 private long gHotSpotVMLongConstants; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
521 private long gHotSpotVMLongConstantEntryNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
522 private long gHotSpotVMLongConstantEntryValueOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
523 private long gHotSpotVMLongConstantEntryArrayStride; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
524 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
525 class VMLongConstants implements Iterable<VMLongConstants.Constant> { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
526 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
527 private long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
528 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
529 public VMLongConstants(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
530 this.address = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
531 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
532 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
533 public Iterator<VMLongConstants.Constant> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
534 return new Iterator<VMLongConstants.Constant>() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
535 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
536 private int index = 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
537 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
538 private Constant currentEntry() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
539 return new Constant(address + gHotSpotVMLongConstantEntryArrayStride * index); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
540 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
541 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
542 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
543 * The last entry is identified by a NULL name. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
544 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
545 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
546 Constant entry = currentEntry(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
547 return entry.getName() != null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
548 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
549 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
550 public Constant next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
551 Constant entry = currentEntry(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
552 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
553 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
554 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
555 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
556 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
557 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
558 throw GraalInternalError.unimplemented(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
559 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
560 }; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
561 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
562 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
563 class Constant extends AbstractConstant { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
564 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
565 Constant(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
566 super(address, gHotSpotVMLongConstantEntryNameOffset, gHotSpotVMLongConstantEntryValueOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
567 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
568 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
569 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
570 public long getValue() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
571 return unsafe.getLong(address + valueOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
572 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
573 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
574 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
575 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
576 return String.format("LongConstant[name=%s, value=%d (0x%x)]", getName(), getValue(), getValue()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
577 } |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
578 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
579 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
580 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
581 class Flags implements Iterable<Flags.Flag> { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
582 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
583 private long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
584 private long entrySize; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
585 private long typeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
586 private long nameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
587 private long addrOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
588 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
589 public Flags(HashMap<String, VMFields.Field> vmStructs, HashMap<String, VMTypes.Type> vmTypes) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
590 address = vmStructs.get("Flag::flags").getValue(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
591 entrySize = vmTypes.get("Flag").getSize(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
592 typeOffset = vmStructs.get("Flag::_type").getOffset(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
593 nameOffset = vmStructs.get("Flag::_name").getOffset(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
594 addrOffset = vmStructs.get("Flag::_addr").getOffset(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
595 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
596 // TODO use the following after we switched to JDK 8 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
597 assert vmTypes.get("bool").getSize() == Byte.SIZE / Byte.SIZE; // TODO Byte.BYTES; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
598 assert vmTypes.get("intx").getSize() == Long.SIZE / Byte.SIZE; // TODO Long.BYTES; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
599 assert vmTypes.get("uintx").getSize() == Long.SIZE / Byte.SIZE; // TODO Long.BYTES; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
600 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
601 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
602 public Iterator<Flags.Flag> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
603 return new Iterator<Flags.Flag>() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
604 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
605 private int index = 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
606 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
607 private Flag current() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
608 return new Flag(address + entrySize * index); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
609 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
610 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
611 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
612 * The last entry is identified by a NULL name. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
613 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
614 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
615 Flag entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
616 return entry.getName() != null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
617 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
618 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
619 public Flag next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
620 Flag entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
621 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
622 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
623 } |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
624 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
625 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
626 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
627 throw GraalInternalError.unimplemented(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
628 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
629 }; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
630 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
631 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
632 class Flag { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
633 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
634 private long entryAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
635 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
636 Flag(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
637 this.entryAddress = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
638 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
639 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
640 public String getType() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
641 long typeAddress = unsafe.getAddress(entryAddress + typeOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
642 return readCStringAsString(typeAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
643 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
644 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
645 public String getName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
646 long nameAddress = unsafe.getAddress(entryAddress + nameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
647 return readCStringAsString(nameAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
648 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
649 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
650 public long getAddr() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
651 return unsafe.getAddress(entryAddress + addrOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
652 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
653 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
654 public Object getValue() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
655 switch (getType()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
656 case "bool": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
657 return Boolean.valueOf(unsafe.getByte(getAddr()) != 0); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
658 case "intx": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
659 case "uintx": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
660 case "uint64_t": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
661 return Long.valueOf(unsafe.getLong(getAddr())); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
662 case "double": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
663 return Double.valueOf(unsafe.getDouble(getAddr())); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
664 case "ccstr": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
665 case "ccstrlist": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
666 return readCStringAsString(getAddr()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
667 default: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
668 throw GraalInternalError.shouldNotReachHere(getType()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
669 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
670 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
671 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
672 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
673 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
674 return String.format("Flag[type=%s, name=%s, value=%s]", getType(), getName(), getValue()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
675 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
676 } |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
677 } |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
678 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
679 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
680 * Read a null-terminated C string from memory and convert it to a Java String. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
681 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
682 private static String readCStringAsString(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
683 if (address == 0) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
684 return null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
685 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
686 StringBuffer sb = new StringBuffer(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
687 for (int i = 0;; i++) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
688 char c = (char) unsafe.getByte(address + i); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
689 if (c == 0) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
690 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
691 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
692 sb.append(c); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
693 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
694 return sb.toString(); |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
695 } |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
696 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
697 // os information, register layout, code generation, ... |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
698 @HotSpotVMConstant(name = "ASSERT") @Stable public boolean cAssertions; |
9585 | 699 public final boolean windowsOs = System.getProperty("os.name", "").startsWith("Windows"); |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
700 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
701 @HotSpotVMFlag(name = "CodeEntryAlignment") @Stable public int codeEntryAlignment; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
702 @HotSpotVMFlag(name = "VerifyOops") @Stable public boolean verifyOops; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
703 @HotSpotVMFlag(name = "CITime") @Stable public boolean ciTime; |
12779
f6c511451e4a
made Graal report its compilation info under -XX:+CITime in the same format as c1 and c2
Doug Simon <doug.simon@oracle.com>
parents:
12739
diff
changeset
|
704 @HotSpotVMFlag(name = "CITimeEach", optional = true) @Stable public boolean ciTimeEach; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
705 @HotSpotVMFlag(name = "CompileThreshold") @Stable public long compileThreshold; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
706 @HotSpotVMFlag(name = "CompileTheWorld") @Stable public boolean compileTheWorld; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
707 @HotSpotVMFlag(name = "CompileTheWorldStartAt") @Stable public int compileTheWorldStartAt; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
708 @HotSpotVMFlag(name = "CompileTheWorldStopAt") @Stable public int compileTheWorldStopAt; |
13371
4db09b7304da
read DontCompileHugeMethods and HugeMethodLimit from VM
Doug Simon <doug.simon@oracle.com>
parents:
13350
diff
changeset
|
709 @HotSpotVMFlag(name = "DontCompileHugeMethods") @Stable public boolean dontCompileHugeMethods; |
4db09b7304da
read DontCompileHugeMethods and HugeMethodLimit from VM
Doug Simon <doug.simon@oracle.com>
parents:
13350
diff
changeset
|
710 @HotSpotVMFlag(name = "HugeMethodLimit") @Stable public int hugeMethodLimit; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
711 @HotSpotVMFlag(name = "PrintCompilation") @Stable public boolean printCompilation; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
712 @HotSpotVMFlag(name = "PrintInlining") @Stable public boolean printInlining; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
713 @HotSpotVMFlag(name = "GraalUseFastLocking") @Stable public boolean useFastLocking; |
13476
e6309fde98c8
exposed ForceUnreachable to Graal and used it when emitting safepoint polling code
Doug Simon <doug.simon@oracle.com>
parents:
13371
diff
changeset
|
714 @HotSpotVMFlag(name = "ForceUnreachable") @Stable public boolean forceUnreachable; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
715 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
716 @HotSpotVMFlag(name = "UseTLAB") @Stable public boolean useTLAB; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
717 @HotSpotVMFlag(name = "UseBiasedLocking") @Stable public boolean useBiasedLocking; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
718 @HotSpotVMFlag(name = "UsePopCountInstruction") @Stable public boolean usePopCountInstruction; |
13539
504d3d12a939
UseCountLeadingZerosInstruction is AMD64 only; making optional
twisti
parents:
13520
diff
changeset
|
719 @HotSpotVMFlag(name = "UseCountLeadingZerosInstruction", optional = true) @Stable public boolean useCountLeadingZerosInstruction; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
720 @HotSpotVMFlag(name = "UseAESIntrinsics") @Stable public boolean useAESIntrinsics; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
721 @HotSpotVMFlag(name = "UseCRC32Intrinsics") @Stable public boolean useCRC32Intrinsics; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
722 @HotSpotVMFlag(name = "UseG1GC") @Stable public boolean useG1GC; |
13640
bfe7a8c8c3c6
Add UseConcMarcSweepGC flag to HotSpotVMConfig.
Roland Schatz <roland.schatz@oracle.com>
parents:
13593
diff
changeset
|
723 @HotSpotVMFlag(name = "UseConcMarkSweepGC") @Stable public boolean useCMSGC; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
724 |
13255
785bbb619238
Basic allocation prefetching support
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13254
diff
changeset
|
725 @HotSpotVMFlag(name = "AllocatePrefetchStyle") @Stable public int allocatePrefetchStyle; |
785bbb619238
Basic allocation prefetching support
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13254
diff
changeset
|
726 @HotSpotVMFlag(name = "AllocatePrefetchInstr") @Stable public int allocatePrefetchInstr; |
785bbb619238
Basic allocation prefetching support
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13254
diff
changeset
|
727 @HotSpotVMFlag(name = "AllocatePrefetchLines") @Stable public int allocatePrefetchLines; |
785bbb619238
Basic allocation prefetching support
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13254
diff
changeset
|
728 @HotSpotVMFlag(name = "AllocateInstancePrefetchLines") @Stable public int allocateInstancePrefetchLines; |
785bbb619238
Basic allocation prefetching support
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13254
diff
changeset
|
729 @HotSpotVMFlag(name = "AllocatePrefetchStepSize") @Stable public int allocatePrefetchStepSize; |
785bbb619238
Basic allocation prefetching support
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13254
diff
changeset
|
730 @HotSpotVMFlag(name = "AllocatePrefetchDistance") @Stable public int allocatePrefetchDistance; |
785bbb619238
Basic allocation prefetching support
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13254
diff
changeset
|
731 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
732 @HotSpotVMField(name = "Universe::_collectedHeap", type = "CollectedHeap*", get = HotSpotVMField.Type.VALUE) @Stable private long universeCollectedHeap; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
733 @HotSpotVMField(name = "CollectedHeap::_total_collections", type = "unsigned int", get = HotSpotVMField.Type.OFFSET) @Stable private int collectedHeapTotalCollectionsOffset; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
734 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
735 public long gcTotalCollectionsAddress() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
736 return universeCollectedHeap + collectedHeapTotalCollectionsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
737 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
738 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
739 @HotSpotVMFlag(name = "GraalDeferredInitBarriers") @Stable public boolean useDeferredInitBarriers; |
12739
b699233403ad
Delegate hprof enabled information from hotspot to graal
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
12559
diff
changeset
|
740 @HotSpotVMFlag(name = "GraalHProfEnabled") @Stable public boolean useHeapProfiler; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
741 |
9883
477fb9a9a06d
Delegate compressed oop arguments from HotSpot to Graal
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
9820
diff
changeset
|
742 // Compressed Oops related values. |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
743 @HotSpotVMFlag(name = "UseCompressedOops") @Stable public boolean useCompressedOops; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
744 @HotSpotVMFlag(name = "UseCompressedClassPointers") @Stable public boolean useCompressedClassPointers; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
745 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
746 @HotSpotVMField(name = "Universe::_narrow_oop._base", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long narrowOopBase; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
747 @HotSpotVMField(name = "Universe::_narrow_oop._shift", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int narrowOopShift; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
748 @HotSpotVMFlag(name = "ObjectAlignmentInBytes") @Stable public int objectAlignment; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
749 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
750 public int logMinObjAlignment() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
751 return (int) (Math.log(objectAlignment) / Math.log(2)); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
752 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
753 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
754 @HotSpotVMField(name = "Universe::_narrow_klass._base", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long narrowKlassBase; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
755 @HotSpotVMField(name = "Universe::_narrow_klass._shift", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int narrowKlassShift; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
756 @HotSpotVMConstant(name = "LogKlassAlignmentInBytes") @Stable public int logKlassAlignment; |
9883
477fb9a9a06d
Delegate compressed oop arguments from HotSpot to Graal
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
9820
diff
changeset
|
757 |
9189
0331f7512be2
CPU capability detection.
Roland Schatz <roland.schatz@oracle.com>
parents:
9108
diff
changeset
|
758 // CPU capabilities |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
759 @HotSpotVMFlag(name = "UseSSE") @Stable public int useSSE; |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
760 @HotSpotVMFlag(name = "UseAVX", archs = {"amd64"}) @Stable public int useAVX; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
761 |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
762 // X86 specific values |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
763 @HotSpotVMField(name = "VM_Version::_cpuFeatures", type = "int", get = HotSpotVMField.Type.VALUE, archs = {"amd64"}) @Stable public int x86CPUFeatures; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
764 @HotSpotVMConstant(name = "VM_Version::CPU_CX8", archs = {"amd64"}) @Stable public int cpuCX8; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
765 @HotSpotVMConstant(name = "VM_Version::CPU_CMOV", archs = {"amd64"}) @Stable public int cpuCMOV; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
766 @HotSpotVMConstant(name = "VM_Version::CPU_FXSR", archs = {"amd64"}) @Stable public int cpuFXSR; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
767 @HotSpotVMConstant(name = "VM_Version::CPU_HT", archs = {"amd64"}) @Stable public int cpuHT; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
768 @HotSpotVMConstant(name = "VM_Version::CPU_MMX", archs = {"amd64"}) @Stable public int cpuMMX; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
769 @HotSpotVMConstant(name = "VM_Version::CPU_3DNOW_PREFETCH", archs = {"amd64"}) @Stable public int cpu3DNOWPREFETCH; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
770 @HotSpotVMConstant(name = "VM_Version::CPU_SSE", archs = {"amd64"}) @Stable public int cpuSSE; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
771 @HotSpotVMConstant(name = "VM_Version::CPU_SSE2", archs = {"amd64"}) @Stable public int cpuSSE2; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
772 @HotSpotVMConstant(name = "VM_Version::CPU_SSE3", archs = {"amd64"}) @Stable public int cpuSSE3; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
773 @HotSpotVMConstant(name = "VM_Version::CPU_SSSE3", archs = {"amd64"}) @Stable public int cpuSSSE3; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
774 @HotSpotVMConstant(name = "VM_Version::CPU_SSE4A", archs = {"amd64"}) @Stable public int cpuSSE4A; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
775 @HotSpotVMConstant(name = "VM_Version::CPU_SSE4_1", archs = {"amd64"}) @Stable public int cpuSSE41; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
776 @HotSpotVMConstant(name = "VM_Version::CPU_SSE4_2", archs = {"amd64"}) @Stable public int cpuSSE42; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
777 @HotSpotVMConstant(name = "VM_Version::CPU_POPCNT", archs = {"amd64"}) @Stable public int cpuPOPCNT; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
778 @HotSpotVMConstant(name = "VM_Version::CPU_LZCNT", archs = {"amd64"}) @Stable public int cpuLZCNT; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
779 @HotSpotVMConstant(name = "VM_Version::CPU_TSC", archs = {"amd64"}) @Stable public int cpuTSC; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
780 @HotSpotVMConstant(name = "VM_Version::CPU_TSCINV", archs = {"amd64"}) @Stable public int cpuTSCINV; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
781 @HotSpotVMConstant(name = "VM_Version::CPU_AVX", archs = {"amd64"}) @Stable public int cpuAVX; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
782 @HotSpotVMConstant(name = "VM_Version::CPU_AVX2", archs = {"amd64"}) @Stable public int cpuAVX2; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
783 @HotSpotVMConstant(name = "VM_Version::CPU_AES", archs = {"amd64"}) @Stable public int cpuAES; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
784 @HotSpotVMConstant(name = "VM_Version::CPU_ERMS", archs = {"amd64"}) @Stable public int cpuERMS; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
785 @HotSpotVMConstant(name = "VM_Version::CPU_CLMUL", archs = {"amd64"}) @Stable public int cpuCLMUL; |
9189
0331f7512be2
CPU capability detection.
Roland Schatz <roland.schatz@oracle.com>
parents:
9108
diff
changeset
|
786 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
787 // offsets, ... |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
788 @HotSpotVMFlag(name = "StackShadowPages") @Stable public int stackShadowPages; |
13252
5d2bc83e9d22
force long encoding of frame push instruction in a method without a stack bang; removed -G:StackShadowPages option
Doug Simon <doug.simon@oracle.com>
parents:
13242
diff
changeset
|
789 @HotSpotVMFlag(name = "UseStackBanging") @Stable public boolean useStackBanging; |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
790 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
791 @HotSpotVMField(name = "oopDesc::_mark", type = "markOop", get = HotSpotVMField.Type.OFFSET) @Stable public int markOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
792 @HotSpotVMField(name = "oopDesc::_metadata._klass", type = "Klass*", get = HotSpotVMField.Type.OFFSET) @Stable public int hubOffset; |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
793 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
794 @HotSpotVMField(name = "Klass::_prototype_header", type = "markOop", get = HotSpotVMField.Type.OFFSET) @Stable public int prototypeMarkWordOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
795 @HotSpotVMField(name = "Klass::_subklass", type = "Klass*", get = HotSpotVMField.Type.OFFSET) @Stable public int subklassOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
796 @HotSpotVMField(name = "Klass::_next_sibling", type = "Klass*", get = HotSpotVMField.Type.OFFSET) @Stable public int nextSiblingOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
797 @HotSpotVMField(name = "Klass::_super_check_offset", type = "juint", get = HotSpotVMField.Type.OFFSET) @Stable public int superCheckOffsetOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
798 @HotSpotVMField(name = "Klass::_secondary_super_cache", type = "Klass*", get = HotSpotVMField.Type.OFFSET) @Stable public int secondarySuperCacheOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
799 @HotSpotVMField(name = "Klass::_secondary_supers", type = "Array<Klass*>*", get = HotSpotVMField.Type.OFFSET) @Stable public int secondarySupersOffset; |
6367
cc402f4396f4
deleted caching of initial mark word in HotSpotResolvedJavaType. This value is modified by the biased locking mechanism and so it not constant for a Klass
Doug Simon <doug.simon@oracle.com>
parents:
6364
diff
changeset
|
800 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
801 @HotSpotVMType(name = "vtableEntry", get = HotSpotVMType.Type.SIZE) @Stable public int vtableEntrySize; |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
802 @HotSpotVMField(name = "vtableEntry::_method", type = "Method*", get = HotSpotVMField.Type.OFFSET) @Stable public int vtableEntryMethodOffset; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
803 @Stable public int instanceKlassVtableStartOffset; |
7037
dd81042f4eb1
added unit tests for ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
6950
diff
changeset
|
804 |
dd81042f4eb1
added unit tests for ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
6950
diff
changeset
|
805 /** |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
806 * The offset of the array length word in an array object's header. |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
807 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
808 @Stable public int arrayLengthOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
809 |
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
|
810 @HotSpotVMField(name = "Array<int>::_length", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int arrayU1LengthOffset; |
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
|
811 @HotSpotVMField(name = "Array<u1>::_data", type = "", get = HotSpotVMField.Type.OFFSET) @Stable public int arrayU1DataOffset; |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
812 @HotSpotVMField(name = "Array<Klass*>::_length", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int metaspaceArrayLengthOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
813 @HotSpotVMField(name = "Array<Klass*>::_data[0]", type = "Klass*", get = HotSpotVMField.Type.OFFSET) @Stable public int metaspaceArrayBaseOffset; |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
814 |
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
|
815 @HotSpotVMField(name = "InstanceKlass::_source_file_name_index", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int klassSourceFileNameIndexOffset; |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
816 @HotSpotVMField(name = "InstanceKlass::_init_state", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int klassStateOffset; |
13305
a63d65b682a8
moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
twisti
parents:
13261
diff
changeset
|
817 @HotSpotVMField(name = "InstanceKlass::_constants", type = "ConstantPool*", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassConstantsOffset; |
a63d65b682a8
moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
twisti
parents:
13261
diff
changeset
|
818 |
13214
3f34b8f91cc5
moved CompilerToVM.isTypeInitialized and isTypeLinked to Java
twisti
parents:
13182
diff
changeset
|
819 @HotSpotVMConstant(name = "InstanceKlass::linked") @Stable public int klassStateLinked; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
820 @HotSpotVMConstant(name = "InstanceKlass::fully_initialized") @Stable public int klassStateFullyInitialized; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
821 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
822 @HotSpotVMField(name = "ObjArrayKlass::_element_klass", type = "Klass*", get = HotSpotVMField.Type.OFFSET) @Stable public int arrayClassElementOffset; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
823 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
824 @HotSpotVMField(name = "Thread::_tlab", type = "ThreadLocalAllocBuffer", get = HotSpotVMField.Type.OFFSET) @Stable public int threadTlabOffset; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
825 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
826 @HotSpotVMField(name = "JavaThread::_anchor", type = "JavaFrameAnchor", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadAnchorOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
827 @HotSpotVMField(name = "JavaThread::_threadObj", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int threadObjectOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
828 @HotSpotVMField(name = "JavaThread::_osthread", type = "OSThread*", get = HotSpotVMField.Type.OFFSET) @Stable public int osThreadOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
829 @HotSpotVMField(name = "JavaThread::_dirty_card_queue", type = "DirtyCardQueue", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadDirtyCardQueueOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
830 @HotSpotVMField(name = "JavaThread::_is_method_handle_return", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int threadIsMethodHandleReturnOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
831 @HotSpotVMField(name = "JavaThread::_satb_mark_queue", type = "ObjPtrQueue", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadSatbMarkQueueOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
832 @HotSpotVMField(name = "JavaThread::_vm_result", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int threadObjectResultOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
833 @HotSpotVMField(name = "JavaThread::_graal_counters[0]", type = "jlong", get = HotSpotVMField.Type.OFFSET, optional = true) @Stable public int graalCountersThreadOffset; |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
834 |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
835 @HotSpotVMConstant(name = "GRAAL_COUNTERS_SIZE") @Stable public int graalCountersSize; |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
836 |
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
837 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
838 * This field is used to pass exception objects into and out of the runtime system during |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
839 * exception handling for compiled code. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
840 * <p> |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
841 * <b>NOTE: This is not the same as {@link #pendingExceptionOffset}.</b> |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
842 */ |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
843 @HotSpotVMField(name = "JavaThread::_exception_oop", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int threadExceptionOopOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
844 @HotSpotVMField(name = "JavaThread::_exception_pc", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable public int threadExceptionPcOffset; |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
845 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
846 @HotSpotVMField(name = "JavaFrameAnchor::_last_Java_sp", type = "intptr_t*", get = HotSpotVMField.Type.OFFSET) @Stable private int javaFrameAnchorLastJavaSpOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
847 @HotSpotVMField(name = "JavaFrameAnchor::_last_Java_pc", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable private int javaFrameAnchorLastJavaPcOffset; |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
848 @HotSpotVMField(name = "JavaFrameAnchor::_last_Java_fp", type = "intptr_t*", get = HotSpotVMField.Type.OFFSET, archs = {"amd64"}) @Stable private int javaFrameAnchorLastJavaFpOffset; |
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
849 @HotSpotVMField(name = "JavaFrameAnchor::_flags", type = "int", get = HotSpotVMField.Type.OFFSET, archs = {"sparc"}) @Stable private int javaFrameAnchorFlagsOffset; |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
850 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
851 public int threadLastJavaSpOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
852 return javaThreadAnchorOffset + javaFrameAnchorLastJavaSpOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
853 } |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
854 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
855 public int threadLastJavaPcOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
856 return javaThreadAnchorOffset + javaFrameAnchorLastJavaPcOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
857 } |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
858 |
9562
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9519
diff
changeset
|
859 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
860 * This value is only valid on AMD64. |
11852
d7964e96b0b0
move benchmark counters into separate class and make them correct for multithreaded applications
Lukas Stadler <lukas.stadler@jku.at>
parents:
11559
diff
changeset
|
861 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
862 public int threadLastJavaFpOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
863 // TODO add an assert for AMD64 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
864 return javaThreadAnchorOffset + javaFrameAnchorLastJavaFpOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
865 } |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
866 |
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
867 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
868 * This value is only valid on SPARC. |
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
|
869 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
870 public int threadJavaFrameAnchorFlagsOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
871 // TODO add an assert for SPARC |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
872 return javaThreadAnchorOffset + javaFrameAnchorFlagsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
873 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
874 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
875 @HotSpotVMField(name = "PtrQueue::_active", type = "bool", get = HotSpotVMField.Type.OFFSET) @Stable public int ptrQueueActiveOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
876 @HotSpotVMField(name = "PtrQueue::_buf", type = "void**", get = HotSpotVMField.Type.OFFSET) @Stable public int ptrQueueBufferOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
877 @HotSpotVMField(name = "PtrQueue::_index", type = "size_t", get = HotSpotVMField.Type.OFFSET) @Stable public int ptrQueueIndexOffset; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
878 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
879 @HotSpotVMField(name = "OSThread::_interrupted", type = "jint", get = HotSpotVMField.Type.OFFSET) @Stable public int osThreadInterruptedOffset; |
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
|
880 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
881 @HotSpotVMConstant(name = "markOopDesc::unlocked_value") @Stable public int unlockedMask; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
882 @HotSpotVMConstant(name = "markOopDesc::biased_lock_mask_in_place") @Stable public int biasedLockMaskInPlace; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
883 @HotSpotVMConstant(name = "markOopDesc::age_mask_in_place") @Stable public int ageMaskInPlace; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
884 @HotSpotVMConstant(name = "markOopDesc::epoch_mask_in_place") @Stable public int epochMaskInPlace; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
885 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
886 @HotSpotVMConstant(name = "markOopDesc::hash_shift") @Stable public long markOopDescHashShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
887 @HotSpotVMConstant(name = "markOopDesc::hash_mask") @Stable public long markOopDescHashMask; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
888 @HotSpotVMConstant(name = "markOopDesc::hash_mask_in_place") @Stable public long markOopDescHashMaskInPlace; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
889 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
890 @HotSpotVMConstant(name = "markOopDesc::biased_lock_pattern") @Stable public int biasedLockPattern; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
891 @HotSpotVMConstant(name = "markOopDesc::no_hash_in_place") @Stable public int markWordNoHashInPlace; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
892 @HotSpotVMConstant(name = "markOopDesc::no_lock_in_place") @Stable public int markWordNoLockInPlace; |
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
|
893 |
abeeb57b655d
added MonitorSnippets which passes MonitorTest but is not yet enabled for general lowering
Doug Simon <doug.simon@oracle.com>
parents:
6375
diff
changeset
|
894 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
895 * See markOopDesc::prototype(). |
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
|
896 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
897 public long arrayPrototypeMarkWord() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
898 return markWordNoHashInPlace | markWordNoLockInPlace; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
899 } |
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
|
900 |
abeeb57b655d
added MonitorSnippets which passes MonitorTest but is not yet enabled for general lowering
Doug Simon <doug.simon@oracle.com>
parents:
6375
diff
changeset
|
901 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
902 * See markOopDesc::copy_set_hash(). |
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
|
903 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
904 public long tlabIntArrayMarkWord() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
905 long tmp = arrayPrototypeMarkWord() & (~markOopDescHashMaskInPlace); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
906 tmp |= ((0x2 & markOopDescHashMask) << markOopDescHashShift); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
907 return tmp; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
908 } |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
909 |
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
910 /** |
9517
51973e9ec004
added comments clarifying the difference between _exception_oop and _pending_exception in the HotSpot Thread class
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
911 * Offset of the _pending_exception field in ThreadShadow (defined in exceptions.hpp). This |
51973e9ec004
added comments clarifying the difference between _exception_oop and _pending_exception in the HotSpot Thread class
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
912 * field is used to propagate exceptions through C/C++ calls. |
51973e9ec004
added comments clarifying the difference between _exception_oop and _pending_exception in the HotSpot Thread class
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
913 * <p> |
51973e9ec004
added comments clarifying the difference between _exception_oop and _pending_exception in the HotSpot Thread class
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
914 * <b>NOTE: This is not the same as {@link #threadExceptionOopOffset}.</b> |
9338
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9232
diff
changeset
|
915 */ |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
916 @HotSpotVMField(name = "ThreadShadow::_pending_exception", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int pendingExceptionOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
917 @HotSpotVMField(name = "ThreadShadow::_pending_deoptimization", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int pendingDeoptimizationOffset; |
13641
5a9afbf72714
Add a speculation oop for uncommon trap deoptimization. Save it in the SpeculationLog during deoptimization.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13640
diff
changeset
|
918 @HotSpotVMField(name = "ThreadShadow::_pending_failed_speculation", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int pendingFailedSpeculationOffset; |
8337
37977d1dcedc
Transmit deoptimization reason in thread local.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
8127
diff
changeset
|
919 |
37977d1dcedc
Transmit deoptimization reason in thread local.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
8127
diff
changeset
|
920 /** |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
921 * Mark word right shift to get identity hash code. |
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
922 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
923 @HotSpotVMConstant(name = "markOopDesc::hash_shift") @Stable public int identityHashCodeShift; |
10056
a323a9e20f9d
Fixed a few race conditions in the compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10026
diff
changeset
|
924 |
a323a9e20f9d
Fixed a few race conditions in the compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10026
diff
changeset
|
925 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
926 * Identity hash code value when uninitialized. |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
927 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
928 @HotSpotVMConstant(name = "markOopDesc::no_hash") @Stable public int uninitializedIdentityHashCodeValue; |
7212
291ffc492eb6
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
Doug Simon <doug.simon@oracle.com>
parents:
7154
diff
changeset
|
929 |
291ffc492eb6
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
Doug Simon <doug.simon@oracle.com>
parents:
7154
diff
changeset
|
930 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
931 * Used for marking a Method object as queued for compilation. |
7212
291ffc492eb6
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
Doug Simon <doug.simon@oracle.com>
parents:
7154
diff
changeset
|
932 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
933 @HotSpotVMConstant(name = "JVM_ACC_QUEUED") @Stable public int methodQueuedForCompilationBit; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
934 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
935 @HotSpotVMField(name = "Method::_access_flags", type = "AccessFlags", get = HotSpotVMField.Type.OFFSET) @Stable public int methodAccessFlagsOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
936 @HotSpotVMField(name = "Method::_constMethod", type = "ConstMethod*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodConstMethodOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
937 @HotSpotVMField(name = "Method::_intrinsic_id", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int methodIntrinsicIdOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
938 @HotSpotVMField(name = "Method::_vtable_index", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodVtableIndexOffset; |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9693
diff
changeset
|
939 |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9693
diff
changeset
|
940 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
941 * Value of Method::extra_stack_entries(). |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9693
diff
changeset
|
942 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
943 @Stable public int extraStackEntries; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
944 |
13306
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
945 @HotSpotVMField(name = "ConstMethod::_constants", type = "ConstantPool*", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodConstantsOffset; |
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
946 @HotSpotVMField(name = "ConstMethod::_flags", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodFlagsOffset; |
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
|
947 @HotSpotVMField(name = "ConstMethod::_code_size", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodCodeSizeOffset; |
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
|
948 @HotSpotVMField(name = "ConstMethod::_name_index", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodNameIndexOffset; |
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
|
949 @HotSpotVMField(name = "ConstMethod::_signature_index", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodSignatureIndexOffset; |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
950 @HotSpotVMField(name = "ConstMethod::_max_stack", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodMaxStackOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
951 @HotSpotVMField(name = "ConstMethod::_max_locals", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int methodMaxLocalsOffset; |
13306
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
952 |
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
953 @HotSpotVMConstant(name = "ConstMethod::_has_localvariable_table") @Stable public int constMethodHasLocalVariableTable; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
954 |
13305
a63d65b682a8
moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
twisti
parents:
13261
diff
changeset
|
955 @HotSpotVMType(name = "ExceptionTableElement", get = HotSpotVMType.Type.SIZE) @Stable public int exceptionTableElementSize; |
a63d65b682a8
moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
twisti
parents:
13261
diff
changeset
|
956 @HotSpotVMField(name = "ExceptionTableElement::start_pc", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int exceptionTableElementStartPcOffset; |
a63d65b682a8
moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
twisti
parents:
13261
diff
changeset
|
957 @HotSpotVMField(name = "ExceptionTableElement::end_pc", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int exceptionTableElementEndPcOffset; |
a63d65b682a8
moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
twisti
parents:
13261
diff
changeset
|
958 @HotSpotVMField(name = "ExceptionTableElement::handler_pc", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int exceptionTableElementHandlerPcOffset; |
a63d65b682a8
moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
twisti
parents:
13261
diff
changeset
|
959 @HotSpotVMField(name = "ExceptionTableElement::catch_type_index", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int exceptionTableElementCatchTypeIndexOffset; |
a63d65b682a8
moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
twisti
parents:
13261
diff
changeset
|
960 |
13306
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
961 @HotSpotVMType(name = "LocalVariableTableElement", get = HotSpotVMType.Type.SIZE) @Stable public int localVariableTableElementSize; |
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
962 @HotSpotVMField(name = "LocalVariableTableElement::start_bci", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int localVariableTableElementStartBciOffset; |
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
963 @HotSpotVMField(name = "LocalVariableTableElement::length", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int localVariableTableElementLengthOffset; |
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
964 @HotSpotVMField(name = "LocalVariableTableElement::name_cp_index", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int localVariableTableElementNameCpIndexOffset; |
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
965 @HotSpotVMField(name = "LocalVariableTableElement::descriptor_cp_index", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int localVariableTableElementDescriptorCpIndexOffset; |
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
966 @HotSpotVMField(name = "LocalVariableTableElement::signature_cp_index", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int localVariableTableElementSignatureCpIndexOffset; |
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
967 @HotSpotVMField(name = "LocalVariableTableElement::slot", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int localVariableTableElementSlotOffset; |
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
968 |
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
|
969 @HotSpotVMType(name = "ConstantPool", get = HotSpotVMType.Type.SIZE) @Stable public int constantPoolSize; |
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
|
970 @HotSpotVMField(name = "ConstantPool::_tags", type = "Array<u1>*", get = HotSpotVMField.Type.OFFSET) @Stable public int constantPoolTagsOffset; |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
971 @HotSpotVMField(name = "ConstantPool::_pool_holder", type = "InstanceKlass*", get = HotSpotVMField.Type.OFFSET) @Stable public int constantPoolHolderOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
972 @HotSpotVMField(name = "ConstantPool::_length", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int constantPoolLengthOffset; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
973 |
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
|
974 @HotSpotVMConstant(name = "JVM_CONSTANT_Utf8") @Stable public int jvmConstantUtf8; |
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
|
975 @HotSpotVMConstant(name = "JVM_CONSTANT_Integer") @Stable public int jvmConstantInteger; |
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
|
976 @HotSpotVMConstant(name = "JVM_CONSTANT_Long") @Stable public int jvmConstantLong; |
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
|
977 @HotSpotVMConstant(name = "JVM_CONSTANT_Float") @Stable public int jvmConstantFloat; |
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
|
978 @HotSpotVMConstant(name = "JVM_CONSTANT_Double") @Stable public int jvmConstantDouble; |
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
|
979 @HotSpotVMConstant(name = "JVM_CONSTANT_Class") @Stable public int jvmConstantClass; |
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
|
980 @HotSpotVMConstant(name = "JVM_CONSTANT_UnresolvedClass") @Stable public int jvmConstantUnresolvedClass; |
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
|
981 @HotSpotVMConstant(name = "JVM_CONSTANT_UnresolvedClassInError") @Stable public int jvmConstantUnresolvedClassInError; |
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
|
982 @HotSpotVMConstant(name = "JVM_CONSTANT_String") @Stable public int jvmConstantString; |
13261
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
983 @HotSpotVMConstant(name = "JVM_CONSTANT_Fieldref") @Stable public int jvmConstantFieldref; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
984 @HotSpotVMConstant(name = "JVM_CONSTANT_Methodref") @Stable public int jvmConstantMethodref; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
985 @HotSpotVMConstant(name = "JVM_CONSTANT_InterfaceMethodref") @Stable public int jvmConstantInterfaceMethodref; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
986 @HotSpotVMConstant(name = "JVM_CONSTANT_NameAndType") @Stable public int jvmConstantNameAndType; |
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
|
987 @HotSpotVMConstant(name = "JVM_CONSTANT_MethodHandle") @Stable public int jvmConstantMethodHandle; |
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
|
988 @HotSpotVMConstant(name = "JVM_CONSTANT_MethodHandleInError") @Stable public int jvmConstantMethodHandleInError; |
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
|
989 @HotSpotVMConstant(name = "JVM_CONSTANT_MethodType") @Stable public int jvmConstantMethodType; |
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
|
990 @HotSpotVMConstant(name = "JVM_CONSTANT_MethodTypeInError") @Stable public int jvmConstantMethodTypeInError; |
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
|
991 |
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
|
992 @HotSpotVMField(name = "Symbol::_length", type = "unsigned short", get = HotSpotVMField.Type.OFFSET) @Stable public int symbolLengthOffset; |
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
|
993 @HotSpotVMField(name = "Symbol::_body[0]", type = "jbyte", get = HotSpotVMField.Type.OFFSET) @Stable public int symbolBodyOffset; |
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
|
994 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
995 @HotSpotVMConstant(name = "JVM_ACC_HAS_FINALIZER") @Stable public int klassHasFinalizerFlag; |
9562
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9519
diff
changeset
|
996 |
10771 | 997 /** |
998 * Bit pattern that represents a non-oop. Neither the high bits nor the low bits of this value | |
999 * are allowed to look like (respectively) the high or low bits of a real oop. | |
1000 */ | |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1001 @HotSpotVMField(name = "Universe::_non_oop_bits", type = "intptr_t", get = HotSpotVMField.Type.VALUE) @Stable public long nonOopBits; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1002 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1003 @HotSpotVMField(name = "StubRoutines::_verify_oop_count", type = "jint", get = HotSpotVMField.Type.ADDRESS) @Stable public long verifyOopCounterAddress; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1004 @Stable public long verifyOopMask; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1005 @Stable public long verifyOopBits; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1006 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1007 @HotSpotVMField(name = "CollectedHeap::_barrier_set", type = "BarrierSet*", get = HotSpotVMField.Type.OFFSET) @Stable public int collectedHeapBarrierSetOffset; |
10771 | 1008 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1009 @HotSpotVMField(name = "HeapRegion::LogOfHRGrainBytes", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int logOfHRGrainBytes; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1010 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1011 @HotSpotVMField(name = "BarrierSet::_kind", type = "BarrierSet::Name", get = HotSpotVMField.Type.OFFSET) @Stable private int barrierSetKindOffset; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1012 @HotSpotVMConstant(name = "BarrierSet::CardTableModRef") @Stable public int barrierSetCardTableModRef; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1013 @HotSpotVMConstant(name = "BarrierSet::CardTableExtension") @Stable public int barrierSetCardTableExtension; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1014 @HotSpotVMConstant(name = "BarrierSet::G1SATBCT") @Stable public int barrierSetG1SATBCT; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1015 @HotSpotVMConstant(name = "BarrierSet::G1SATBCTLogging") @Stable public int barrierSetG1SATBCTLogging; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1016 @HotSpotVMConstant(name = "BarrierSet::ModRef") @Stable public int barrierSetModRef; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1017 @HotSpotVMConstant(name = "BarrierSet::Other") @Stable public int barrierSetOther; |
9574
df3aa336a313
replaced verify_oop assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9562
diff
changeset
|
1018 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1019 @HotSpotVMField(name = "CardTableModRefBS::byte_map_base", type = "jbyte*", get = HotSpotVMField.Type.OFFSET) @Stable private int cardTableModRefBSByteMapBaseOffset; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1020 @HotSpotVMConstant(name = "CardTableModRefBS::card_shift") @Stable public int cardTableModRefBSCardShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1021 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1022 public long cardtableStartAddress() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1023 final long barrierSetAddress = unsafe.getAddress(universeCollectedHeap + collectedHeapBarrierSetOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1024 final int kind = unsafe.getInt(barrierSetAddress + barrierSetKindOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1025 if ((kind == barrierSetCardTableModRef) || (kind == barrierSetCardTableExtension) || (kind == barrierSetG1SATBCT) || (kind == barrierSetG1SATBCTLogging)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1026 final long base = unsafe.getAddress(barrierSetAddress + cardTableModRefBSByteMapBaseOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1027 assert base != 0 : "unexpected byte_map_base: " + base; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1028 return base; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1029 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1030 if ((kind == barrierSetModRef) || (kind == barrierSetOther)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1031 // No post barriers |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1032 return 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1033 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1034 throw GraalInternalError.shouldNotReachHere("kind: " + kind); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1035 } |
9517
51973e9ec004
added comments clarifying the difference between _exception_oop and _pending_exception in the HotSpot Thread class
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
1036 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1037 public int cardtableShift() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1038 final long barrierSetAddress = unsafe.getAddress(universeCollectedHeap + collectedHeapBarrierSetOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1039 final int kind = unsafe.getInt(barrierSetAddress + barrierSetKindOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1040 if ((kind == barrierSetCardTableModRef) || (kind == barrierSetCardTableExtension) || (kind == barrierSetG1SATBCT) || (kind == barrierSetG1SATBCTLogging)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1041 return cardTableModRefBSCardShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1042 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1043 if ((kind == barrierSetModRef) || (kind == barrierSetOther)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1044 // No post barriers |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1045 return 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1046 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1047 throw GraalInternalError.shouldNotReachHere("kind: " + kind); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1048 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1049 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1050 @HotSpotVMField(name = "os::_polling_page", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long safepointPollingAddress; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1051 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1052 // G1 Collector Related Values. |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
1053 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1054 public int g1CardQueueIndexOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1055 return javaThreadDirtyCardQueueOffset + ptrQueueIndexOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1056 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1057 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1058 public int g1CardQueueBufferOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1059 return javaThreadDirtyCardQueueOffset + ptrQueueBufferOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1060 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1061 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1062 public int g1SATBQueueMarkingOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1063 return javaThreadSatbMarkQueueOffset + ptrQueueActiveOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1064 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1065 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1066 public int g1SATBQueueIndexOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1067 return javaThreadSatbMarkQueueOffset + ptrQueueIndexOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1068 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1069 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1070 public int g1SATBQueueBufferOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1071 return javaThreadSatbMarkQueueOffset + ptrQueueBufferOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1072 } |
8490
1567c6cc6561
Towards porting G1 WBs
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
8489
diff
changeset
|
1073 |
1567c6cc6561
Towards porting G1 WBs
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
8489
diff
changeset
|
1074 /** |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
1075 * The offset of the _java_mirror field (of type {@link Class}) in a Klass. |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
1076 */ |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1077 @HotSpotVMField(name = "Klass::_java_mirror", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int classMirrorOffset; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
1078 |
13517
eefb0224149d
derive CPUFeatures from VM_Version::_cpuFeatures
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13479
diff
changeset
|
1079 @HotSpotVMConstant(name = "frame::arg_reg_save_area_bytes", archs = {"amd64"}) @Stable public int runtimeCallStackSize; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
1080 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1081 @HotSpotVMField(name = "Klass::_super", type = "Klass*", get = HotSpotVMField.Type.OFFSET) @Stable public int klassSuperKlassOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1082 @HotSpotVMField(name = "Klass::_modifier_flags", type = "jint", get = HotSpotVMField.Type.OFFSET) @Stable public int klassModifierFlagsOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1083 @HotSpotVMField(name = "Klass::_access_flags", type = "AccessFlags", get = HotSpotVMField.Type.OFFSET) @Stable public int klassAccessFlagsOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1084 @HotSpotVMField(name = "Klass::_layout_helper", type = "jint", get = HotSpotVMField.Type.OFFSET) @Stable public int klassLayoutHelperOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1085 @HotSpotVMField(name = "Klass::_layout_helper", type = "jint", get = HotSpotVMField.Type.OFFSET) @Stable public int klassInstanceSizeOffset; |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
1086 |
13261
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1087 @HotSpotVMConstant(name = "Klass::_lh_neutral_value") @Stable public int klassLayoutHelperNeutralValue; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1088 @HotSpotVMConstant(name = "Klass::_lh_instance_slow_path_bit") @Stable public int klassLayoutHelperInstanceSlowPathBit; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1089 @HotSpotVMConstant(name = "Klass::_lh_log2_element_size_shift") @Stable public int layoutHelperLog2ElementSizeShift; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1090 @HotSpotVMConstant(name = "Klass::_lh_log2_element_size_mask") @Stable public int layoutHelperLog2ElementSizeMask; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1091 @HotSpotVMConstant(name = "Klass::_lh_element_type_shift") @Stable public int layoutHelperElementTypeShift; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1092 @HotSpotVMConstant(name = "Klass::_lh_element_type_mask") @Stable public int layoutHelperElementTypeMask; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1093 @HotSpotVMConstant(name = "Klass::_lh_header_size_shift") @Stable public int layoutHelperHeaderSizeShift; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1094 @HotSpotVMConstant(name = "Klass::_lh_header_size_mask") @Stable public int layoutHelperHeaderSizeMask; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1095 @HotSpotVMConstant(name = "Klass::_lh_array_tag_shift") @Stable public int layoutHelperArrayTagShift; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1096 @HotSpotVMConstant(name = "Klass::_lh_array_tag_type_value") @Stable public int layoutHelperArrayTagTypeValue; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1097 @HotSpotVMConstant(name = "Klass::_lh_array_tag_obj_value") @Stable public int layoutHelperArrayTagObjectValue; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1098 |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1099 /** |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1100 * This filters out the bit that differentiates a type array from an object array. |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1101 */ |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1102 public int layoutHelperElementTypePrimitiveInPlace() { |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1103 return (layoutHelperArrayTagTypeValue & ~layoutHelperArrayTagObjectValue) << layoutHelperArrayTagShift; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1104 } |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1105 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1106 @HotSpotVMField(name = "ArrayKlass::_component_mirror", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int arrayKlassComponentMirrorOffset; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1107 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1108 @HotSpotVMField(name = "java_lang_Class::_klass_offset", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int klassOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1109 @HotSpotVMField(name = "java_lang_Class::_array_klass_offset", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int arrayKlassOffset; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1110 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1111 @HotSpotVMField(name = "Method::_method_data", type = "MethodData*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1112 @HotSpotVMField(name = "Method::_from_compiled_entry", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable public int methodCompiledEntryOffset; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1113 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1114 @HotSpotVMField(name = "MethodData::_size", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataSize; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1115 @HotSpotVMField(name = "MethodData::_data_size", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataDataSize; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1116 @HotSpotVMField(name = "MethodData::_data[0]", type = "intptr_t", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOopDataOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1117 @HotSpotVMField(name = "MethodData::_trap_hist._array[0]", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOopTrapHistoryOffset; |
13241 | 1118 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1119 @HotSpotVMField(name = "nmethod::_verified_entry_point", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable public int nmethodEntryOffset; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1120 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1121 @HotSpotVMType(name = "BasicLock", get = HotSpotVMType.Type.SIZE) @Stable public int basicLockSize; |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1122 @HotSpotVMField(name = "BasicLock::_displaced_header", type = "markOop", get = HotSpotVMField.Type.OFFSET) @Stable public int basicLockDisplacedHeaderOffset; |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
1123 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1124 @Stable public long heapEndAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1125 @Stable public long heapTopAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1126 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1127 @HotSpotVMField(name = "Thread::_allocated_bytes", type = "jlong", get = HotSpotVMField.Type.OFFSET) @Stable public int threadAllocatedBytesOffset; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1128 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1129 @HotSpotVMFlag(name = "TLABWasteIncrement") @Stable public int tlabRefillWasteIncrement; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1130 @Stable public int tlabAlignmentReserve; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1131 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1132 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_start", type = "HeapWord*", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferStartOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1133 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_end", type = "HeapWord*", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferEndOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1134 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_top", type = "HeapWord*", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferTopOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1135 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_slow_allocations", type = "unsigned", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferSlowAllocationsOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1136 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_fast_refill_waste", type = "unsigned", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferFastRefillWasteOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1137 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_number_of_refills", type = "unsigned", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferNumberOfRefillsOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1138 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_refill_waste_limit", type = "size_t", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferRefillWasteLimitOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1139 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_desired_size", type = "size_t", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferDesiredSizeOffset; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1140 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1141 public int tlabSlowAllocationsOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1142 return threadTlabOffset + threadLocalAllocBufferSlowAllocationsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1143 } |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
1144 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1145 public int tlabFastRefillWasteOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1146 return threadTlabOffset + threadLocalAllocBufferFastRefillWasteOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1147 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1148 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1149 public int tlabNumberOfRefillsOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1150 return threadTlabOffset + threadLocalAllocBufferNumberOfRefillsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1151 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1152 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1153 public int tlabRefillWasteLimitOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1154 return threadTlabOffset + threadLocalAllocBufferRefillWasteLimitOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1155 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1156 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1157 public int threadTlabSizeOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1158 return threadTlabOffset + threadLocalAllocBufferDesiredSizeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1159 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1160 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1161 public int threadTlabStartOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1162 return threadTlabOffset + threadLocalAllocBufferStartOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1163 } |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
1164 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1165 public int threadTlabEndOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1166 return threadTlabOffset + threadLocalAllocBufferEndOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1167 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1168 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1169 public int threadTlabTopOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1170 return threadTlabOffset + threadLocalAllocBufferTopOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1171 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1172 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1173 @HotSpotVMFlag(name = "TLABStats") @Stable public boolean tlabStats; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1174 @Stable public boolean inlineContiguousAllocationSupported; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
1175 |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
1176 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1177 * The DataLayout header size is the same as the cell size. |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
1178 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1179 @HotSpotVMConstant(name = "DataLayout::cell_size") @Stable public int dataLayoutHeaderSize; |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1180 @HotSpotVMField(name = "DataLayout::_header._struct._tag", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int dataLayoutTagOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1181 @HotSpotVMField(name = "DataLayout::_header._struct._flags", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int dataLayoutFlagsOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1182 @HotSpotVMField(name = "DataLayout::_header._struct._bci", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int dataLayoutBCIOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1183 @HotSpotVMField(name = "DataLayout::_cells[0]", type = "intptr_t", get = HotSpotVMField.Type.OFFSET) @Stable public int dataLayoutCellsOffset; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1184 @HotSpotVMConstant(name = "DataLayout::cell_size") @Stable public int dataLayoutCellSize; |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
1185 |
13182 | 1186 @HotSpotVMConstant(name = "DataLayout::no_tag") @Stable public int dataLayoutNoTag; |
1187 @HotSpotVMConstant(name = "DataLayout::bit_data_tag") @Stable public int dataLayoutBitDataTag; | |
1188 @HotSpotVMConstant(name = "DataLayout::counter_data_tag") @Stable public int dataLayoutCounterDataTag; | |
1189 @HotSpotVMConstant(name = "DataLayout::jump_data_tag") @Stable public int dataLayoutJumpDataTag; | |
1190 @HotSpotVMConstant(name = "DataLayout::receiver_type_data_tag") @Stable public int dataLayoutReceiverTypeDataTag; | |
1191 @HotSpotVMConstant(name = "DataLayout::virtual_call_data_tag") @Stable public int dataLayoutVirtualCallDataTag; | |
1192 @HotSpotVMConstant(name = "DataLayout::ret_data_tag") @Stable public int dataLayoutRetDataTag; | |
1193 @HotSpotVMConstant(name = "DataLayout::branch_data_tag") @Stable public int dataLayoutBranchDataTag; | |
1194 @HotSpotVMConstant(name = "DataLayout::multi_branch_data_tag") @Stable public int dataLayoutMultiBranchDataTag; | |
1195 @HotSpotVMConstant(name = "DataLayout::arg_info_data_tag") @Stable public int dataLayoutArgInfoDataTag; | |
1196 @HotSpotVMConstant(name = "DataLayout::call_type_data_tag") @Stable public int dataLayoutCallTypeDataTag; | |
1197 @HotSpotVMConstant(name = "DataLayout::virtual_call_type_data_tag") @Stable public int dataLayoutVirtualCallTypeDataTag; | |
1198 @HotSpotVMConstant(name = "DataLayout::parameters_type_data_tag") @Stable public int dataLayoutParametersTypeDataTag; | |
1199 | |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1200 @HotSpotVMFlag(name = "BciProfileWidth") @Stable public int bciProfileWidth; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1201 @HotSpotVMFlag(name = "TypeProfileWidth") @Stable public int typeProfileWidth; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1202 @HotSpotVMFlag(name = "MethodProfileWidth") @Stable public int methodProfileWidth; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1203 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1204 @HotSpotVMField(name = "CodeBlob::_code_offset", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable private int codeBlobCodeOffsetOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1205 @HotSpotVMField(name = "SharedRuntime::_ic_miss_blob", type = "RuntimeStub*", get = HotSpotVMField.Type.VALUE) @Stable private long inlineCacheMissBlob; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1206 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1207 public long inlineCacheMissStub() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1208 return inlineCacheMissBlob + unsafe.getInt(inlineCacheMissBlob + codeBlobCodeOffsetOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1209 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1210 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1211 @HotSpotVMField(name = "CodeCache::_heap", type = "CodeHeap*", get = HotSpotVMField.Type.VALUE) @Stable private long codeCacheHeap; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1212 @HotSpotVMField(name = "CodeHeap::_memory", type = "VirtualSpace", get = HotSpotVMField.Type.OFFSET) @Stable private int codeHeapMemoryOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1213 @HotSpotVMField(name = "VirtualSpace::_low_boundary", type = "char*", get = HotSpotVMField.Type.OFFSET) @Stable private int virtualSpaceLowBoundaryOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1214 @HotSpotVMField(name = "VirtualSpace::_high_boundary", type = "char*", get = HotSpotVMField.Type.OFFSET) @Stable private int virtualSpaceHighBoundaryOffset; |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1215 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1216 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1217 * @return CodeCache::_heap->_memory._low_boundary |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1218 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1219 public long codeCacheLowBoundary() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1220 return unsafe.getAddress(codeCacheHeap + codeHeapMemoryOffset + virtualSpaceLowBoundaryOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1221 } |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1222 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1223 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1224 * @return CodeCache::_heap->_memory._high_boundary |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1225 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1226 public long codeCacheHighBoundary() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1227 return unsafe.getAddress(codeCacheHeap + codeHeapMemoryOffset + virtualSpaceHighBoundaryOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1228 } |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4199
diff
changeset
|
1229 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1230 @Stable public long handleDeoptStub; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1231 @Stable public long uncommonTrapStub; |
8502
ff4fa8b0516e
-Create push patch
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
8499
diff
changeset
|
1232 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1233 @HotSpotVMField(name = "StubRoutines::_aescrypt_encryptBlock", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long aescryptEncryptBlockStub; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1234 @HotSpotVMField(name = "StubRoutines::_aescrypt_decryptBlock", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long aescryptDecryptBlockStub; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1235 @HotSpotVMField(name = "StubRoutines::_cipherBlockChaining_encryptAESCrypt", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long cipherBlockChainingEncryptAESCryptStub; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1236 @HotSpotVMField(name = "StubRoutines::_cipherBlockChaining_decryptAESCrypt", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long cipherBlockChainingDecryptAESCryptStub; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1237 @HotSpotVMField(name = "StubRoutines::_updateBytesCRC32", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long updateBytesCRC32Stub; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1238 @HotSpotVMField(name = "StubRoutines::_crc_table_adr", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long crcTableAddress; |
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
|
1239 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1240 @Stable public long newInstanceAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1241 @Stable public long newArrayAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1242 @Stable public long newMultiArrayAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1243 @Stable public long dynamicNewArrayAddress; |
13578
d8143c431d63
Add DynamicNewInstanceNode and use it to intrinsify Unsafe.allocateInstance
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13539
diff
changeset
|
1244 @Stable public long dynamicNewInstanceAddress; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1245 @Stable public long registerFinalizerAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1246 @Stable public long threadIsInterruptedAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1247 @Stable public long vmMessageAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1248 @Stable public long identityHashCodeAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1249 @Stable public long exceptionHandlerForPcAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1250 @Stable public long exceptionHandlerForReturnAddressAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1251 @Stable public long osrMigrationEndAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1252 @Stable public long monitorenterAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1253 @Stable public long monitorexitAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1254 @Stable public long createNullPointerExceptionAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1255 @Stable public long createOutOfBoundsExceptionAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1256 @Stable public long logPrimitiveAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1257 @Stable public long logObjectAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1258 @Stable public long logPrintfAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1259 @Stable public long vmErrorAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1260 @Stable public long writeBarrierPreAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1261 @Stable public long writeBarrierPostAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1262 @Stable public long validateObject; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1263 @Stable public long javaTimeMillisAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1264 @Stable public long javaTimeNanosAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1265 @Stable public long arithmeticSinAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1266 @Stable public long arithmeticCosAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1267 @Stable public long arithmeticTanAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1268 @Stable public long loadAndClearExceptionAddress; |
9338
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9232
diff
changeset
|
1269 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1270 @HotSpotVMConstant(name = "Deoptimization::Reason_none") @Stable public int deoptReasonNone; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1271 @HotSpotVMConstant(name = "Deoptimization::Reason_null_check") @Stable public int deoptReasonNullCheck; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1272 @HotSpotVMConstant(name = "Deoptimization::Reason_range_check") @Stable public int deoptReasonRangeCheck; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1273 @HotSpotVMConstant(name = "Deoptimization::Reason_class_check") @Stable public int deoptReasonClassCheck; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1274 @HotSpotVMConstant(name = "Deoptimization::Reason_array_check") @Stable public int deoptReasonArrayCheck; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1275 @HotSpotVMConstant(name = "Deoptimization::Reason_null_assert") @Stable public int deoptReasonUnreached0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1276 @HotSpotVMConstant(name = "Deoptimization::Reason_intrinsic") @Stable public int deoptReasonTypeCheckInlining; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1277 @HotSpotVMConstant(name = "Deoptimization::Reason_bimorphic") @Stable public int deoptReasonOptimizedTypeCheck; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1278 @HotSpotVMConstant(name = "Deoptimization::Reason_unhandled") @Stable public int deoptReasonNotCompiledExceptionHandler; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1279 @HotSpotVMConstant(name = "Deoptimization::Reason_uninitialized") @Stable public int deoptReasonUnresolved; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1280 @HotSpotVMConstant(name = "Deoptimization::Reason_age") @Stable public int deoptReasonJsrMismatch; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1281 @HotSpotVMConstant(name = "Deoptimization::Reason_div0_check") @Stable public int deoptReasonDiv0Check; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1282 @HotSpotVMConstant(name = "Deoptimization::Reason_constraint") @Stable public int deoptReasonConstraint; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1283 @HotSpotVMConstant(name = "Deoptimization::Reason_loop_limit_check") @Stable public int deoptReasonLoopLimitCheck; |
13155
1dd9aa5a9ee5
Deoptimization reason for failed aliasing assumptions.
Roland Schatz <roland.schatz@oracle.com>
parents:
13103
diff
changeset
|
1284 @HotSpotVMConstant(name = "Deoptimization::Reason_aliasing") @Stable public int deoptReasonAliasing; |
13216
51e97f88c771
Profile deoptimizations of OSR methods separately.
Roland Schatz <roland.schatz@oracle.com>
parents:
13214
diff
changeset
|
1285 @HotSpotVMConstant(name = "Deoptimization::Reason_LIMIT") @Stable public int deoptReasonOSROffset; |
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
|
1286 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1287 @HotSpotVMConstant(name = "Deoptimization::Action_none") @Stable public int deoptActionNone; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1288 @HotSpotVMConstant(name = "Deoptimization::Action_maybe_recompile") @Stable public int deoptActionMaybeRecompile; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1289 @HotSpotVMConstant(name = "Deoptimization::Action_reinterpret") @Stable public int deoptActionReinterpret; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1290 @HotSpotVMConstant(name = "Deoptimization::Action_make_not_entrant") @Stable public int deoptActionMakeNotEntrant; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1291 @HotSpotVMConstant(name = "Deoptimization::Action_make_not_compilable") @Stable public int deoptActionMakeNotCompilable; |
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
|
1292 |
13257
4eacfd0767ed
get deoptimization constants in HotSpotMetaAccessProvider from HotSpotVMConfig
twisti
parents:
13255
diff
changeset
|
1293 @HotSpotVMConstant(name = "Deoptimization::_action_bits") @Stable public int deoptimizationActionBits; |
4eacfd0767ed
get deoptimization constants in HotSpotMetaAccessProvider from HotSpotVMConfig
twisti
parents:
13255
diff
changeset
|
1294 @HotSpotVMConstant(name = "Deoptimization::_reason_bits") @Stable public int deoptimizationReasonBits; |
13641
5a9afbf72714
Add a speculation oop for uncommon trap deoptimization. Save it in the SpeculationLog during deoptimization.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13640
diff
changeset
|
1295 @HotSpotVMConstant(name = "Deoptimization::_debug_id_bits") @Stable public int deoptimizationDebugIdBits; |
13257
4eacfd0767ed
get deoptimization constants in HotSpotMetaAccessProvider from HotSpotVMConfig
twisti
parents:
13255
diff
changeset
|
1296 @HotSpotVMConstant(name = "Deoptimization::_action_shift") @Stable public int deoptimizationActionShift; |
4eacfd0767ed
get deoptimization constants in HotSpotMetaAccessProvider from HotSpotVMConfig
twisti
parents:
13255
diff
changeset
|
1297 @HotSpotVMConstant(name = "Deoptimization::_reason_shift") @Stable public int deoptimizationReasonShift; |
13641
5a9afbf72714
Add a speculation oop for uncommon trap deoptimization. Save it in the SpeculationLog during deoptimization.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13640
diff
changeset
|
1298 @HotSpotVMConstant(name = "Deoptimization::_debug_id_shift") @Stable public int deoptimizationDebugIdShift; |
13257
4eacfd0767ed
get deoptimization constants in HotSpotMetaAccessProvider from HotSpotVMConfig
twisti
parents:
13255
diff
changeset
|
1299 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1300 @HotSpotVMConstant(name = "vmIntrinsics::_invokeBasic") @Stable public int vmIntrinsicInvokeBasic; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1301 @HotSpotVMConstant(name = "vmIntrinsics::_linkToVirtual") @Stable public int vmIntrinsicLinkToVirtual; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1302 @HotSpotVMConstant(name = "vmIntrinsics::_linkToStatic") @Stable public int vmIntrinsicLinkToStatic; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1303 @HotSpotVMConstant(name = "vmIntrinsics::_linkToSpecial") @Stable public int vmIntrinsicLinkToSpecial; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1304 @HotSpotVMConstant(name = "vmIntrinsics::_linkToInterface") @Stable public int vmIntrinsicLinkToInterface; |
9013
3b0ec709827c
added macro substitutions for the @PolymorphicSignature methods in MethodHandle
Doug Simon <doug.simon@oracle.com>
parents:
8996
diff
changeset
|
1305 |
13170
f294b4ee2d47
make CodeInstallResult enum independent of the actual values in C++ code
twisti
parents:
13155
diff
changeset
|
1306 @HotSpotVMConstant(name = "GraalEnv::ok") @Stable public int codeInstallResultOk; |
f294b4ee2d47
make CodeInstallResult enum independent of the actual values in C++ code
twisti
parents:
13155
diff
changeset
|
1307 @HotSpotVMConstant(name = "GraalEnv::dependencies_failed") @Stable public int codeInstallResultDependenciesFailed; |
f294b4ee2d47
make CodeInstallResult enum independent of the actual values in C++ code
twisti
parents:
13155
diff
changeset
|
1308 @HotSpotVMConstant(name = "GraalEnv::cache_full") @Stable public int codeInstallResultCacheFull; |
f294b4ee2d47
make CodeInstallResult enum independent of the actual values in C++ code
twisti
parents:
13155
diff
changeset
|
1309 @HotSpotVMConstant(name = "GraalEnv::code_too_large") @Stable public int codeInstallResultCodeTooLarge; |
f294b4ee2d47
make CodeInstallResult enum independent of the actual values in C++ code
twisti
parents:
13155
diff
changeset
|
1310 |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1311 public boolean check() { |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1312 for (Field f : getClass().getDeclaredFields()) { |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1313 int modifiers = f.getModifiers(); |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1314 if (Modifier.isPublic(modifiers) && !Modifier.isStatic(modifiers)) { |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1315 assert Modifier.isFinal(modifiers) || f.getAnnotation(Stable.class) != null : "field should either be final or @Stable: " + f; |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1316 } |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1317 } |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1318 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1319 assert codeEntryAlignment > 0 : codeEntryAlignment; |
13593 | 1320 assert (layoutHelperArrayTagObjectValue & (1 << (Integer.SIZE - 1))) != 0 : "object array must have first bit set"; |
1321 assert (layoutHelperArrayTagTypeValue & (1 << (Integer.SIZE - 1))) != 0 : "type array must have first bit set"; | |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1322 |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1323 return true; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1324 } |
13520
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1325 |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1326 /** |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1327 * A compact representation of the different encoding strategies for Objects and metadata. |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1328 */ |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1329 public static class CompressEncoding { |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1330 public final long base; |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1331 public final int shift; |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1332 public final int alignment; |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1333 |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1334 CompressEncoding(long base, int shift, int alignment) { |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1335 this.base = base; |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1336 this.shift = shift; |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1337 this.alignment = alignment; |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1338 } |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1339 |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1340 @Override |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1341 public String toString() { |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1342 return "base: " + base + " shift: " + shift + " alignment: " + alignment; |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1343 } |
fb7b39f07232
Embed compressed constants when possible and use more efficient patterns for encoding
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13517
diff
changeset
|
1344 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1345 } |