Mercurial > hg > graal-compiler
annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java @ 13305:a63d65b682a8
moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
author | twisti |
---|---|
date | Wed, 11 Dec 2013 20:42:50 -0800 |
parents | 0ffe9e4bb364 |
children | dfb780080923 |
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 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
42 HotSpotVMConfig(CompilerToVM compilerToVm) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
43 compilerToVm.initializeConfiguration(this); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
44 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
45 // Fill the VM fields hash map. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
46 HashMap<String, VMFields.Field> vmFields = new HashMap<>(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
47 for (VMFields.Field e : new VMFields(gHotSpotVMStructs)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
48 vmFields.put(e.getName(), e); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
49 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
50 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
51 // Fill the VM types hash map. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
52 HashMap<String, VMTypes.Type> vmTypes = new HashMap<>(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
53 for (VMTypes.Type e : new VMTypes(gHotSpotVMTypes)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
54 vmTypes.put(e.getTypeName(), e); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
55 } |
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 constants hash map. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
58 HashMap<String, AbstractConstant> vmConstants = new HashMap<>(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
59 for (AbstractConstant e : new VMIntConstants(gHotSpotVMIntConstants)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
60 vmConstants.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 for (AbstractConstant e : new VMLongConstants(gHotSpotVMLongConstants)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
63 vmConstants.put(e.getName(), e); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
64 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
65 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
66 // Fill the flags hash map. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
67 HashMap<String, Flags.Flag> flags = new HashMap<>(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
68 for (Flags.Flag e : new Flags(vmFields, vmTypes)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
69 flags.put(e.getName(), e); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
70 } |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
71 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
72 for (Field f : HotSpotVMConfig.class.getDeclaredFields()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
73 if (f.isAnnotationPresent(HotSpotVMField.class)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
74 HotSpotVMField annotation = f.getAnnotation(HotSpotVMField.class); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
75 String name = annotation.name(); |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
76 String type = annotation.type(); |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
77 VMFields.Field entry = vmFields.get(name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
78 if (entry == null) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
79 if (annotation.optional()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
80 continue; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
81 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
82 throw new IllegalArgumentException("field not found: " + name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
83 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
84 } |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
85 |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
86 // 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
|
87 if (!type.equals("")) { |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
88 if (!type.equals(entry.getTypeString())) { |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
89 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
|
90 } |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
91 } |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
92 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
93 switch (annotation.get()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
94 case OFFSET: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
95 setField(f, entry.getOffset()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
96 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
97 case ADDRESS: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
98 setField(f, entry.getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
99 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
100 case VALUE: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
101 setField(f, entry.getValue()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
102 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
103 default: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
104 throw GraalInternalError.shouldNotReachHere("unknown kind " + annotation.get()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
105 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
106 } else if (f.isAnnotationPresent(HotSpotVMType.class)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
107 HotSpotVMType annotation = f.getAnnotation(HotSpotVMType.class); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
108 String name = annotation.name(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
109 VMTypes.Type entry = vmTypes.get(name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
110 if (entry == null) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
111 throw new IllegalArgumentException("type not found: " + name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
112 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
113 switch (annotation.get()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
114 case SIZE: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
115 setField(f, entry.getSize()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
116 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
117 default: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
118 throw GraalInternalError.shouldNotReachHere("unknown kind " + annotation.get()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
119 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
120 } else if (f.isAnnotationPresent(HotSpotVMConstant.class)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
121 HotSpotVMConstant annotation = f.getAnnotation(HotSpotVMConstant.class); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
122 String name = annotation.name(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
123 AbstractConstant entry = vmConstants.get(name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
124 if (entry == null) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
125 if (annotation.optional()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
126 continue; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
127 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
128 throw new IllegalArgumentException("constant not found: " + name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
129 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
130 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
131 setField(f, entry.getValue()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
132 } else if (f.isAnnotationPresent(HotSpotVMFlag.class)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
133 HotSpotVMFlag annotation = f.getAnnotation(HotSpotVMFlag.class); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
134 String name = annotation.name(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
135 Flags.Flag entry = flags.get(name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
136 if (entry == null) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
137 if (annotation.optional()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
138 continue; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
139 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
140 throw new IllegalArgumentException("flag not found: " + name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
141 } |
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 setField(f, entry.getValue()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
144 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
145 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
146 |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
147 assert check(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
148 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
149 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
150 private void setField(Field field, Object value) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
151 try { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
152 Class<?> fieldType = field.getType(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
153 if (fieldType == boolean.class) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
154 if (value instanceof String) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
155 field.setBoolean(this, Boolean.valueOf((String) value)); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
156 } else if (value instanceof Boolean) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
157 field.setBoolean(this, (boolean) value); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
158 } else if (value instanceof Long) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
159 field.setBoolean(this, ((long) value) != 0); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
160 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
161 GraalInternalError.shouldNotReachHere(value.getClass().getSimpleName()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
162 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
163 } else if (fieldType == int.class) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
164 if (value instanceof Integer) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
165 field.setInt(this, (int) value); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
166 } else if (value instanceof Long) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
167 field.setInt(this, (int) (long) value); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
168 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
169 GraalInternalError.shouldNotReachHere(value.getClass().getSimpleName()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
170 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
171 } else if (fieldType == long.class) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
172 field.setLong(this, (long) value); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
173 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
174 GraalInternalError.shouldNotReachHere(field.toString()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
175 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
176 } catch (IllegalAccessException e) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
177 throw GraalInternalError.shouldNotReachHere(field.toString() + ": " + e); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
178 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
179 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
180 |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
181 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
182 * VMStructEntry (see vmStructs.hpp). |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
183 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
184 private long gHotSpotVMStructs; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
185 private long gHotSpotVMStructEntryTypeNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
186 private long gHotSpotVMStructEntryFieldNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
187 private long gHotSpotVMStructEntryTypeStringOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
188 private long gHotSpotVMStructEntryIsStaticOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
189 private long gHotSpotVMStructEntryOffsetOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
190 private long gHotSpotVMStructEntryAddressOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
191 private long gHotSpotVMStructEntryArrayStride; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
192 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
193 class VMFields implements Iterable<VMFields.Field> { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
194 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
195 private long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
196 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
197 public VMFields(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
198 this.address = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
199 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
200 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
201 public Iterator<VMFields.Field> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
202 return new Iterator<VMFields.Field>() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
203 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
204 private int index = 0; |
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 private Field current() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
207 return new Field(address + gHotSpotVMStructEntryArrayStride * index); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
208 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
209 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
210 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
211 * The last entry is identified by a NULL fieldName. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
212 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
213 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
214 Field entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
215 return entry.getFieldName() != null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
216 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
217 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
218 public Field next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
219 Field entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
220 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
221 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
222 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
223 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
224 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
225 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
226 throw GraalInternalError.unimplemented(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
227 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
228 }; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
229 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
230 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
231 class Field { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
232 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
233 private long entryAddress; |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
234 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
235 Field(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
236 this.entryAddress = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
237 } |
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 public String getTypeName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
240 long typeNameAddress = unsafe.getAddress(entryAddress + gHotSpotVMStructEntryTypeNameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
241 return readCStringAsString(typeNameAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
242 } |
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 public String getFieldName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
245 long fieldNameAddress = unsafe.getAddress(entryAddress + gHotSpotVMStructEntryFieldNameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
246 return readCStringAsString(fieldNameAddress); |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
249 public String getTypeString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
250 long typeStringAddress = unsafe.getAddress(entryAddress + gHotSpotVMStructEntryTypeStringOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
251 return readCStringAsString(typeStringAddress); |
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 public boolean isStatic() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
255 return unsafe.getInt(entryAddress + gHotSpotVMStructEntryIsStaticOffset) != 0; |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
258 public long getOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
259 return unsafe.getLong(entryAddress + gHotSpotVMStructEntryOffsetOffset); |
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 long getAddress() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
263 return unsafe.getAddress(entryAddress + gHotSpotVMStructEntryAddressOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
264 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
265 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
266 public String getName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
267 String typeName = getTypeName(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
268 String fieldName = getFieldName(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
269 return typeName + "::" + fieldName; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
270 } |
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 public long getValue() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
273 String type = getTypeString(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
274 switch (type) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
275 case "int": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
276 return unsafe.getInt(getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
277 case "address": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
278 case "intptr_t": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
279 return unsafe.getAddress(getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
280 default: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
281 // All foo* types are addresses. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
282 if (type.endsWith("*")) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
283 return unsafe.getAddress(getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
284 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
285 throw GraalInternalError.shouldNotReachHere(type); |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
289 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
290 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
291 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
|
292 getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
293 } |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
294 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
295 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
296 |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
297 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
298 * VMTypeEntry (see vmStructs.hpp). |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
299 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
300 private long gHotSpotVMTypes; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
301 private long gHotSpotVMTypeEntryTypeNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
302 private long gHotSpotVMTypeEntrySuperclassNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
303 private long gHotSpotVMTypeEntryIsOopTypeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
304 private long gHotSpotVMTypeEntryIsIntegerTypeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
305 private long gHotSpotVMTypeEntryIsUnsignedOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
306 private long gHotSpotVMTypeEntrySizeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
307 private long gHotSpotVMTypeEntryArrayStride; |
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 class VMTypes implements Iterable<VMTypes.Type> { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
310 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
311 private long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
312 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
313 public VMTypes(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
314 this.address = address; |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
317 public Iterator<VMTypes.Type> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
318 return new Iterator<VMTypes.Type>() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
319 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
320 private int index = 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
321 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
322 private Type current() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
323 return new Type(address + gHotSpotVMTypeEntryArrayStride * index); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
324 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
325 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
326 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
327 * 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
|
328 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
329 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
330 Type entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
331 return entry.getTypeName() != null; |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
334 public Type next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
335 Type entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
336 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
337 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
338 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
339 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
340 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
341 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
342 throw GraalInternalError.unimplemented(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
343 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
344 }; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
345 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
346 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
347 class Type { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
348 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
349 private long entryAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
350 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
351 Type(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
352 this.entryAddress = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
353 } |
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 public String getTypeName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
356 long typeNameAddress = unsafe.getAddress(entryAddress + gHotSpotVMTypeEntryTypeNameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
357 return readCStringAsString(typeNameAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
358 } |
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 public String getSuperclassName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
361 long superclassNameAddress = unsafe.getAddress(entryAddress + gHotSpotVMTypeEntrySuperclassNameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
362 return readCStringAsString(superclassNameAddress); |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
365 public boolean isOopType() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
366 return unsafe.getInt(entryAddress + gHotSpotVMTypeEntryIsOopTypeOffset) != 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
367 } |
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 public boolean isIntegerType() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
370 return unsafe.getInt(entryAddress + gHotSpotVMTypeEntryIsIntegerTypeOffset) != 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
371 } |
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 isUnsigned() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
374 return unsafe.getInt(entryAddress + gHotSpotVMTypeEntryIsUnsignedOffset) != 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
375 } |
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 public long getSize() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
378 return unsafe.getLong(entryAddress + gHotSpotVMTypeEntrySizeOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
379 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
380 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
381 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
382 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
383 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
|
384 isUnsigned(), getSize()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
385 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
386 } |
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 public abstract class AbstractConstant { |
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 protected long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
392 protected long nameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
393 protected long valueOffset; |
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 AbstractConstant(long address, long nameOffset, long valueOffset) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
396 this.address = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
397 this.nameOffset = nameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
398 this.valueOffset = valueOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
399 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
400 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
401 public String getName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
402 long nameAddress = unsafe.getAddress(address + nameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
403 return readCStringAsString(nameAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
404 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
405 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
406 public abstract long getValue(); |
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 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
410 * VMIntConstantEntry (see vmStructs.hpp). |
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 private long gHotSpotVMIntConstants; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
413 private long gHotSpotVMIntConstantEntryNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
414 private long gHotSpotVMIntConstantEntryValueOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
415 private long gHotSpotVMIntConstantEntryArrayStride; |
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 class VMIntConstants implements Iterable<VMIntConstants.Constant> { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
418 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
419 private long address; |
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 VMIntConstants(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
422 this.address = address; |
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 public Iterator<VMIntConstants.Constant> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
426 return new Iterator<VMIntConstants.Constant>() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
427 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
428 private int index = 0; |
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 private Constant current() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
431 return new Constant(address + gHotSpotVMIntConstantEntryArrayStride * index); |
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 |
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 * The last entry is identified by a NULL name. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
436 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
437 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
438 Constant entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
439 return entry.getName() != null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
440 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
441 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
442 public Constant next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
443 Constant entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
444 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
445 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
446 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
447 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
448 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
449 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
450 throw GraalInternalError.unimplemented(); |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
455 class Constant extends AbstractConstant { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
456 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
457 Constant(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
458 super(address, gHotSpotVMIntConstantEntryNameOffset, gHotSpotVMIntConstantEntryValueOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
459 } |
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 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
462 public long getValue() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
463 return unsafe.getInt(address + valueOffset); |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
466 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
467 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
468 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
|
469 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
470 } |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
471 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
472 |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
473 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
474 * VMLongConstantEntry (see vmStructs.hpp). |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
475 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
476 private long gHotSpotVMLongConstants; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
477 private long gHotSpotVMLongConstantEntryNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
478 private long gHotSpotVMLongConstantEntryValueOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
479 private long gHotSpotVMLongConstantEntryArrayStride; |
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 class VMLongConstants implements Iterable<VMLongConstants.Constant> { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
482 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
483 private long address; |
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 public VMLongConstants(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
486 this.address = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
487 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
488 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
489 public Iterator<VMLongConstants.Constant> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
490 return new Iterator<VMLongConstants.Constant>() { |
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 private int index = 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
493 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
494 private Constant currentEntry() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
495 return new Constant(address + gHotSpotVMLongConstantEntryArrayStride * index); |
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 * The last entry is identified by a NULL name. |
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 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
502 Constant entry = currentEntry(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
503 return entry.getName() != null; |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
506 public Constant next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
507 Constant entry = currentEntry(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
508 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
509 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
510 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
511 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
512 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
513 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
514 throw GraalInternalError.unimplemented(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
515 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
516 }; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
517 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
518 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
519 class Constant extends AbstractConstant { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
520 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
521 Constant(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
522 super(address, gHotSpotVMLongConstantEntryNameOffset, gHotSpotVMLongConstantEntryValueOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
523 } |
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 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
526 public long getValue() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
527 return unsafe.getLong(address + valueOffset); |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
530 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
531 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
532 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
|
533 } |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
534 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
535 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
536 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
537 class Flags implements Iterable<Flags.Flag> { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
538 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
539 private long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
540 private long entrySize; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
541 private long typeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
542 private long nameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
543 private long addrOffset; |
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 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
|
546 address = vmStructs.get("Flag::flags").getValue(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
547 entrySize = vmTypes.get("Flag").getSize(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
548 typeOffset = vmStructs.get("Flag::_type").getOffset(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
549 nameOffset = vmStructs.get("Flag::_name").getOffset(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
550 addrOffset = vmStructs.get("Flag::_addr").getOffset(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
551 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
552 // 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
|
553 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
|
554 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
|
555 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
|
556 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
557 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
558 public Iterator<Flags.Flag> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
559 return new Iterator<Flags.Flag>() { |
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 private int index = 0; |
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 private Flag current() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
564 return new Flag(address + entrySize * index); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
565 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
566 |
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 * The last entry is identified by a NULL name. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
569 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
570 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
571 Flag entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
572 return entry.getName() != null; |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
575 public Flag next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
576 Flag entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
577 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
578 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
579 } |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
580 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
581 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
582 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
583 throw GraalInternalError.unimplemented(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
584 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
585 }; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
586 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
587 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
588 class Flag { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
589 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
590 private long entryAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
591 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
592 Flag(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
593 this.entryAddress = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
594 } |
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 public String getType() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
597 long typeAddress = unsafe.getAddress(entryAddress + typeOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
598 return readCStringAsString(typeAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
599 } |
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 public String getName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
602 long nameAddress = unsafe.getAddress(entryAddress + nameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
603 return readCStringAsString(nameAddress); |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
606 public long getAddr() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
607 return unsafe.getAddress(entryAddress + addrOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
608 } |
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 public Object getValue() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
611 switch (getType()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
612 case "bool": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
613 return Boolean.valueOf(unsafe.getByte(getAddr()) != 0); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
614 case "intx": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
615 case "uintx": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
616 case "uint64_t": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
617 return Long.valueOf(unsafe.getLong(getAddr())); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
618 case "double": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
619 return Double.valueOf(unsafe.getDouble(getAddr())); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
620 case "ccstr": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
621 case "ccstrlist": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
622 return readCStringAsString(getAddr()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
623 default: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
624 throw GraalInternalError.shouldNotReachHere(getType()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
625 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
626 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
627 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
628 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
629 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
630 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
|
631 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
632 } |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
633 } |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
634 |
12559
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 * 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
|
637 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
638 private static String readCStringAsString(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
639 if (address == 0) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
640 return null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
641 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
642 StringBuffer sb = new StringBuffer(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
643 for (int i = 0;; i++) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
644 char c = (char) unsafe.getByte(address + i); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
645 if (c == 0) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
646 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
647 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
648 sb.append(c); |
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 return sb.toString(); |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
651 } |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
652 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
653 // os information, register layout, code generation, ... |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
654 @HotSpotVMConstant(name = "ASSERT") @Stable public boolean cAssertions; |
9585 | 655 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
|
656 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
657 @HotSpotVMFlag(name = "CodeEntryAlignment") @Stable public int codeEntryAlignment; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
658 @HotSpotVMFlag(name = "VerifyOops") @Stable public boolean verifyOops; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
659 @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
|
660 @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
|
661 @HotSpotVMFlag(name = "CompileThreshold") @Stable public long compileThreshold; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
662 @HotSpotVMFlag(name = "CompileTheWorld") @Stable public boolean compileTheWorld; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
663 @HotSpotVMFlag(name = "CompileTheWorldStartAt") @Stable public int compileTheWorldStartAt; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
664 @HotSpotVMFlag(name = "CompileTheWorldStopAt") @Stable public int compileTheWorldStopAt; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
665 @HotSpotVMFlag(name = "PrintCompilation") @Stable public boolean printCompilation; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
666 @HotSpotVMFlag(name = "PrintInlining") @Stable public boolean printInlining; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
667 @HotSpotVMFlag(name = "GraalUseFastLocking") @Stable public boolean useFastLocking; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
668 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
669 @HotSpotVMFlag(name = "UseTLAB") @Stable public boolean useTLAB; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
670 @HotSpotVMFlag(name = "UseBiasedLocking") @Stable public boolean useBiasedLocking; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
671 @HotSpotVMFlag(name = "UsePopCountInstruction") @Stable public boolean usePopCountInstruction; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
672 @HotSpotVMFlag(name = "UseAESIntrinsics") @Stable public boolean useAESIntrinsics; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
673 @HotSpotVMFlag(name = "UseCRC32Intrinsics") @Stable public boolean useCRC32Intrinsics; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
674 @HotSpotVMFlag(name = "UseG1GC") @Stable public boolean useG1GC; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
675 |
13255
785bbb619238
Basic allocation prefetching support
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13254
diff
changeset
|
676 @HotSpotVMFlag(name = "AllocatePrefetchStyle") @Stable public int allocatePrefetchStyle; |
785bbb619238
Basic allocation prefetching support
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13254
diff
changeset
|
677 @HotSpotVMFlag(name = "AllocatePrefetchInstr") @Stable public int allocatePrefetchInstr; |
785bbb619238
Basic allocation prefetching support
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13254
diff
changeset
|
678 @HotSpotVMFlag(name = "AllocatePrefetchLines") @Stable public int allocatePrefetchLines; |
785bbb619238
Basic allocation prefetching support
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13254
diff
changeset
|
679 @HotSpotVMFlag(name = "AllocateInstancePrefetchLines") @Stable public int allocateInstancePrefetchLines; |
785bbb619238
Basic allocation prefetching support
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13254
diff
changeset
|
680 @HotSpotVMFlag(name = "AllocatePrefetchStepSize") @Stable public int allocatePrefetchStepSize; |
785bbb619238
Basic allocation prefetching support
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13254
diff
changeset
|
681 @HotSpotVMFlag(name = "AllocatePrefetchDistance") @Stable public int allocatePrefetchDistance; |
785bbb619238
Basic allocation prefetching support
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13254
diff
changeset
|
682 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
683 @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
|
684 @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
|
685 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
686 public long gcTotalCollectionsAddress() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
687 return universeCollectedHeap + collectedHeapTotalCollectionsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
688 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
689 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
690 @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
|
691 @HotSpotVMFlag(name = "GraalHProfEnabled") @Stable public boolean useHeapProfiler; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
692 |
9883
477fb9a9a06d
Delegate compressed oop arguments from HotSpot to Graal
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
9820
diff
changeset
|
693 // Compressed Oops related values. |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
694 @HotSpotVMFlag(name = "UseCompressedOops") @Stable public boolean useCompressedOops; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
695 @HotSpotVMFlag(name = "UseCompressedClassPointers") @Stable public boolean useCompressedClassPointers; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
696 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
697 @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
|
698 @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
|
699 @HotSpotVMFlag(name = "ObjectAlignmentInBytes") @Stable public int objectAlignment; |
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 public int logMinObjAlignment() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
702 return (int) (Math.log(objectAlignment) / Math.log(2)); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
703 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
704 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
705 @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
|
706 @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
|
707 @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
|
708 |
9189
0331f7512be2
CPU capability detection.
Roland Schatz <roland.schatz@oracle.com>
parents:
9108
diff
changeset
|
709 // CPU capabilities |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
710 @HotSpotVMFlag(name = "UseSSE") @Stable public int useSSE; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
711 @HotSpotVMFlag(name = "UseAVX", optional = true) @Stable public int useAVX; |
9189
0331f7512be2
CPU capability detection.
Roland Schatz <roland.schatz@oracle.com>
parents:
9108
diff
changeset
|
712 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
713 // offsets, ... |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
714 @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
|
715 @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
|
716 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
717 @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
|
718 @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
|
719 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
720 @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
|
721 @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
|
722 @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
|
723 @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
|
724 @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
|
725 @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
|
726 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
727 @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
|
728 @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
|
729 @Stable public int instanceKlassVtableStartOffset; |
7037
dd81042f4eb1
added unit tests for ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
6950
diff
changeset
|
730 |
dd81042f4eb1
added unit tests for ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
6950
diff
changeset
|
731 /** |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
732 * 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
|
733 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
734 @Stable public int arrayLengthOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
735 |
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
|
736 @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
|
737 @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
|
738 @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
|
739 @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
|
740 |
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
|
741 @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
|
742 @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
|
743 @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
|
744 |
13214
3f34b8f91cc5
moved CompilerToVM.isTypeInitialized and isTypeLinked to Java
twisti
parents:
13182
diff
changeset
|
745 @HotSpotVMConstant(name = "InstanceKlass::linked") @Stable public int klassStateLinked; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
746 @HotSpotVMConstant(name = "InstanceKlass::fully_initialized") @Stable public int klassStateFullyInitialized; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
747 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
748 @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
|
749 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
750 @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
|
751 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
752 @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
|
753 @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
|
754 @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
|
755 @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
|
756 @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
|
757 @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
|
758 @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
|
759 @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
|
760 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
761 @HotSpotVMConstant(name = "GRAAL_COUNTERS_SIZE", optional = true) @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
|
762 |
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
763 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
764 * 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
|
765 * exception handling for compiled code. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
766 * <p> |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
767 * <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
|
768 */ |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
769 @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
|
770 @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
|
771 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
772 @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
|
773 @HotSpotVMField(name = "JavaFrameAnchor::_last_Java_pc", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable private int javaFrameAnchorLastJavaPcOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
774 @HotSpotVMField(name = "JavaFrameAnchor::_last_Java_fp", type = "intptr_t*", get = HotSpotVMField.Type.OFFSET, optional = true) @Stable private int javaFrameAnchorLastJavaFpOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
775 @HotSpotVMField(name = "JavaFrameAnchor::_flags", type = "int", get = HotSpotVMField.Type.OFFSET, optional = true) @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
|
776 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
777 public int threadLastJavaSpOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
778 return javaThreadAnchorOffset + javaFrameAnchorLastJavaSpOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
779 } |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
780 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
781 public int threadLastJavaPcOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
782 return javaThreadAnchorOffset + javaFrameAnchorLastJavaPcOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
783 } |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
784 |
9562
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9519
diff
changeset
|
785 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
786 * 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
|
787 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
788 public int threadLastJavaFpOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
789 // TODO add an assert for AMD64 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
790 return javaThreadAnchorOffset + javaFrameAnchorLastJavaFpOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
791 } |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
792 |
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
793 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
794 * 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
|
795 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
796 public int threadJavaFrameAnchorFlagsOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
797 // TODO add an assert for SPARC |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
798 return javaThreadAnchorOffset + javaFrameAnchorFlagsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
799 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
800 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
801 @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
|
802 @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
|
803 @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
|
804 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
805 @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
|
806 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
807 @HotSpotVMConstant(name = "markOopDesc::unlocked_value") @Stable public int unlockedMask; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
808 @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
|
809 @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
|
810 @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
|
811 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
812 @HotSpotVMConstant(name = "markOopDesc::hash_shift") @Stable public long markOopDescHashShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
813 @HotSpotVMConstant(name = "markOopDesc::hash_mask") @Stable public long markOopDescHashMask; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
814 @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
|
815 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
816 @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
|
817 @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
|
818 @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
|
819 |
abeeb57b655d
added MonitorSnippets which passes MonitorTest but is not yet enabled for general lowering
Doug Simon <doug.simon@oracle.com>
parents:
6375
diff
changeset
|
820 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
821 * 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
|
822 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
823 public long arrayPrototypeMarkWord() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
824 return markWordNoHashInPlace | markWordNoLockInPlace; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
825 } |
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
|
826 |
abeeb57b655d
added MonitorSnippets which passes MonitorTest but is not yet enabled for general lowering
Doug Simon <doug.simon@oracle.com>
parents:
6375
diff
changeset
|
827 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
828 * 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
|
829 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
830 public long tlabIntArrayMarkWord() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
831 long tmp = arrayPrototypeMarkWord() & (~markOopDescHashMaskInPlace); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
832 tmp |= ((0x2 & markOopDescHashMask) << markOopDescHashShift); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
833 return tmp; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
834 } |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
835 |
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
836 /** |
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
|
837 * 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
|
838 * 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
|
839 * <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
|
840 * <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
|
841 */ |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
842 @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
|
843 @HotSpotVMField(name = "ThreadShadow::_pending_deoptimization", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int pendingDeoptimizationOffset; |
8337
37977d1dcedc
Transmit deoptimization reason in thread local.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
8127
diff
changeset
|
844 |
37977d1dcedc
Transmit deoptimization reason in thread local.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
8127
diff
changeset
|
845 /** |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
846 * Mark word right shift to get identity hash code. |
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
847 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
848 @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
|
849 |
a323a9e20f9d
Fixed a few race conditions in the compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10026
diff
changeset
|
850 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
851 * 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
|
852 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
853 @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
|
854 |
291ffc492eb6
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
Doug Simon <doug.simon@oracle.com>
parents:
7154
diff
changeset
|
855 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
856 * 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
|
857 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
858 @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
|
859 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
860 @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
|
861 @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
|
862 @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
|
863 @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
|
864 |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9693
diff
changeset
|
865 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
866 * 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
|
867 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
868 @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
|
869 |
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
|
870 @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
|
871 @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
|
872 @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
|
873 @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
|
874 @HotSpotVMField(name = "ConstMethod::_max_locals", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int methodMaxLocalsOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
875 @HotSpotVMField(name = "ConstMethod::_constants", type = "ConstantPool*", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodConstantsOffset; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
876 |
13305
a63d65b682a8
moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
twisti
parents:
13261
diff
changeset
|
877 @HotSpotVMType(name = "ExceptionTableElement", get = HotSpotVMType.Type.SIZE) @Stable public int exceptionTableElementSize; |
a63d65b682a8
moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
twisti
parents:
13261
diff
changeset
|
878 @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
|
879 @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
|
880 @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
|
881 @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
|
882 |
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
|
883 @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
|
884 @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
|
885 @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
|
886 @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
|
887 |
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
|
888 @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
|
889 @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
|
890 @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
|
891 @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
|
892 @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
|
893 @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
|
894 @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
|
895 @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
|
896 @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
|
897 @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
|
898 @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
|
899 @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
|
900 @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
|
901 @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
|
902 @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
|
903 @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
|
904 @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
|
905 |
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
|
906 @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
|
907 @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
|
908 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
909 @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
|
910 |
10771 | 911 /** |
912 * Bit pattern that represents a non-oop. Neither the high bits nor the low bits of this value | |
913 * are allowed to look like (respectively) the high or low bits of a real oop. | |
914 */ | |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
915 @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
|
916 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
917 @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
|
918 @Stable public long verifyOopMask; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
919 @Stable public long verifyOopBits; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
920 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
921 @HotSpotVMField(name = "CollectedHeap::_barrier_set", type = "BarrierSet*", get = HotSpotVMField.Type.OFFSET) @Stable public int collectedHeapBarrierSetOffset; |
10771 | 922 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
923 @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
|
924 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
925 @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
|
926 @HotSpotVMConstant(name = "BarrierSet::CardTableModRef") @Stable public int barrierSetCardTableModRef; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
927 @HotSpotVMConstant(name = "BarrierSet::CardTableExtension") @Stable public int barrierSetCardTableExtension; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
928 @HotSpotVMConstant(name = "BarrierSet::G1SATBCT") @Stable public int barrierSetG1SATBCT; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
929 @HotSpotVMConstant(name = "BarrierSet::G1SATBCTLogging") @Stable public int barrierSetG1SATBCTLogging; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
930 @HotSpotVMConstant(name = "BarrierSet::ModRef") @Stable public int barrierSetModRef; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
931 @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
|
932 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
933 @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
|
934 @HotSpotVMConstant(name = "CardTableModRefBS::card_shift") @Stable public int cardTableModRefBSCardShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
935 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
936 public long cardtableStartAddress() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
937 final long barrierSetAddress = unsafe.getAddress(universeCollectedHeap + collectedHeapBarrierSetOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
938 final int kind = unsafe.getInt(barrierSetAddress + barrierSetKindOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
939 if ((kind == barrierSetCardTableModRef) || (kind == barrierSetCardTableExtension) || (kind == barrierSetG1SATBCT) || (kind == barrierSetG1SATBCTLogging)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
940 final long base = unsafe.getAddress(barrierSetAddress + cardTableModRefBSByteMapBaseOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
941 assert base != 0 : "unexpected byte_map_base: " + base; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
942 return base; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
943 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
944 if ((kind == barrierSetModRef) || (kind == barrierSetOther)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
945 // No post barriers |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
946 return 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
947 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
948 throw GraalInternalError.shouldNotReachHere("kind: " + kind); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
949 } |
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
|
950 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
951 public int cardtableShift() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
952 final long barrierSetAddress = unsafe.getAddress(universeCollectedHeap + collectedHeapBarrierSetOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
953 final int kind = unsafe.getInt(barrierSetAddress + barrierSetKindOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
954 if ((kind == barrierSetCardTableModRef) || (kind == barrierSetCardTableExtension) || (kind == barrierSetG1SATBCT) || (kind == barrierSetG1SATBCTLogging)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
955 return cardTableModRefBSCardShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
956 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
957 if ((kind == barrierSetModRef) || (kind == barrierSetOther)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
958 // No post barriers |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
959 return 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
960 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
961 throw GraalInternalError.shouldNotReachHere("kind: " + kind); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
962 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
963 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
964 @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
|
965 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
966 // 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
|
967 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
968 public int g1CardQueueIndexOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
969 return javaThreadDirtyCardQueueOffset + ptrQueueIndexOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
970 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
971 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
972 public int g1CardQueueBufferOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
973 return javaThreadDirtyCardQueueOffset + ptrQueueBufferOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
974 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
975 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
976 public int g1SATBQueueMarkingOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
977 return javaThreadSatbMarkQueueOffset + ptrQueueActiveOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
978 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
979 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
980 public int g1SATBQueueIndexOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
981 return javaThreadSatbMarkQueueOffset + ptrQueueIndexOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
982 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
983 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
984 public int g1SATBQueueBufferOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
985 return javaThreadSatbMarkQueueOffset + ptrQueueBufferOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
986 } |
8490
1567c6cc6561
Towards porting G1 WBs
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
8489
diff
changeset
|
987 |
1567c6cc6561
Towards porting G1 WBs
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
8489
diff
changeset
|
988 /** |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
989 * 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
|
990 */ |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
991 @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
|
992 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
993 @HotSpotVMConstant(name = "frame::arg_reg_save_area_bytes", optional = true) @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
|
994 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
995 @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
|
996 @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
|
997 @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
|
998 @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
|
999 @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
|
1000 |
13261
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1001 @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
|
1002 @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
|
1003 @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
|
1004 @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
|
1005 @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
|
1006 @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
|
1007 @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
|
1008 @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
|
1009 @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
|
1010 @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
|
1011 @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
|
1012 |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1013 /** |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1014 * 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
|
1015 */ |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1016 public int layoutHelperElementTypePrimitiveInPlace() { |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1017 return (layoutHelperArrayTagTypeValue & ~layoutHelperArrayTagObjectValue) << layoutHelperArrayTagShift; |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1018 } |
0ffe9e4bb364
don't go through VM to create HotSpotResolvedObjectType (part 1)
twisti
parents:
13257
diff
changeset
|
1019 |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
1020 /** |
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
1021 * Bit pattern in the klass layout helper that can be used to identify arrays. |
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
1022 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1023 public final int arrayKlassLayoutHelperIdentifier = 0x80000000; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1024 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1025 @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
|
1026 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1027 @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
|
1028 @HotSpotVMField(name = "java_lang_Class::_array_klass_offset", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int arrayKlassOffset; |
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1029 @HotSpotVMField(name = "java_lang_Class::_graal_mirror_offset", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int graalMirrorInClassOffset; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1030 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1031 @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
|
1032 @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
|
1033 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1034 @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
|
1035 @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
|
1036 @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
|
1037 @HotSpotVMField(name = "MethodData::_trap_hist._array[0]", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOopTrapHistoryOffset; |
13241 | 1038 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1039 @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
|
1040 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1041 @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
|
1042 @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
|
1043 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1044 @Stable public long heapEndAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1045 @Stable public long heapTopAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1046 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1047 @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
|
1048 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1049 @HotSpotVMFlag(name = "TLABWasteIncrement") @Stable public int tlabRefillWasteIncrement; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1050 @Stable public int tlabAlignmentReserve; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1051 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1052 @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
|
1053 @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
|
1054 @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
|
1055 @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
|
1056 @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
|
1057 @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
|
1058 @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
|
1059 @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
|
1060 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1061 public int tlabSlowAllocationsOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1062 return threadTlabOffset + threadLocalAllocBufferSlowAllocationsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1063 } |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
1064 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1065 public int tlabFastRefillWasteOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1066 return threadTlabOffset + threadLocalAllocBufferFastRefillWasteOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1067 } |
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 public int tlabNumberOfRefillsOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1070 return threadTlabOffset + threadLocalAllocBufferNumberOfRefillsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1071 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1072 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1073 public int tlabRefillWasteLimitOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1074 return threadTlabOffset + threadLocalAllocBufferRefillWasteLimitOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1075 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1076 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1077 public int threadTlabSizeOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1078 return threadTlabOffset + threadLocalAllocBufferDesiredSizeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1079 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1080 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1081 public int threadTlabStartOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1082 return threadTlabOffset + threadLocalAllocBufferStartOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1083 } |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
1084 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1085 public int threadTlabEndOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1086 return threadTlabOffset + threadLocalAllocBufferEndOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1087 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1088 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1089 public int threadTlabTopOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1090 return threadTlabOffset + threadLocalAllocBufferTopOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1091 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1092 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1093 @HotSpotVMFlag(name = "TLABStats") @Stable public boolean tlabStats; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1094 @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
|
1095 |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
1096 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1097 * The DataLayout header size is the same as the cell size. |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
1098 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1099 @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
|
1100 @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
|
1101 @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
|
1102 @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
|
1103 @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
|
1104 @HotSpotVMConstant(name = "DataLayout::cell_size") @Stable public int dataLayoutCellSize; |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
1105 |
13182 | 1106 @HotSpotVMConstant(name = "DataLayout::no_tag") @Stable public int dataLayoutNoTag; |
1107 @HotSpotVMConstant(name = "DataLayout::bit_data_tag") @Stable public int dataLayoutBitDataTag; | |
1108 @HotSpotVMConstant(name = "DataLayout::counter_data_tag") @Stable public int dataLayoutCounterDataTag; | |
1109 @HotSpotVMConstant(name = "DataLayout::jump_data_tag") @Stable public int dataLayoutJumpDataTag; | |
1110 @HotSpotVMConstant(name = "DataLayout::receiver_type_data_tag") @Stable public int dataLayoutReceiverTypeDataTag; | |
1111 @HotSpotVMConstant(name = "DataLayout::virtual_call_data_tag") @Stable public int dataLayoutVirtualCallDataTag; | |
1112 @HotSpotVMConstant(name = "DataLayout::ret_data_tag") @Stable public int dataLayoutRetDataTag; | |
1113 @HotSpotVMConstant(name = "DataLayout::branch_data_tag") @Stable public int dataLayoutBranchDataTag; | |
1114 @HotSpotVMConstant(name = "DataLayout::multi_branch_data_tag") @Stable public int dataLayoutMultiBranchDataTag; | |
1115 @HotSpotVMConstant(name = "DataLayout::arg_info_data_tag") @Stable public int dataLayoutArgInfoDataTag; | |
1116 @HotSpotVMConstant(name = "DataLayout::call_type_data_tag") @Stable public int dataLayoutCallTypeDataTag; | |
1117 @HotSpotVMConstant(name = "DataLayout::virtual_call_type_data_tag") @Stable public int dataLayoutVirtualCallTypeDataTag; | |
1118 @HotSpotVMConstant(name = "DataLayout::parameters_type_data_tag") @Stable public int dataLayoutParametersTypeDataTag; | |
1119 | |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1120 @HotSpotVMFlag(name = "BciProfileWidth") @Stable public int bciProfileWidth; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1121 @HotSpotVMFlag(name = "TypeProfileWidth") @Stable public int typeProfileWidth; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1122 @HotSpotVMFlag(name = "MethodProfileWidth") @Stable public int methodProfileWidth; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1123 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1124 @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
|
1125 @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
|
1126 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1127 public long inlineCacheMissStub() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1128 return inlineCacheMissBlob + unsafe.getInt(inlineCacheMissBlob + codeBlobCodeOffsetOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1129 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1130 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1131 @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
|
1132 @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
|
1133 @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
|
1134 @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
|
1135 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1136 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1137 * @return CodeCache::_heap->_memory._low_boundary |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1138 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1139 public long codeCacheLowBoundary() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1140 return unsafe.getAddress(codeCacheHeap + codeHeapMemoryOffset + virtualSpaceLowBoundaryOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1141 } |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1142 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1143 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1144 * @return CodeCache::_heap->_memory._high_boundary |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1145 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1146 public long codeCacheHighBoundary() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1147 return unsafe.getAddress(codeCacheHeap + codeHeapMemoryOffset + virtualSpaceHighBoundaryOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1148 } |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4199
diff
changeset
|
1149 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1150 @Stable public long handleDeoptStub; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1151 @Stable public long uncommonTrapStub; |
8502
ff4fa8b0516e
-Create push patch
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
8499
diff
changeset
|
1152 |
13242
65c0f2ec1ad7
added type to HotSpotVMField annotation in order to verify the expected type
twisti
parents:
13241
diff
changeset
|
1153 @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
|
1154 @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
|
1155 @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
|
1156 @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
|
1157 @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
|
1158 @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
|
1159 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1160 @Stable public long newInstanceAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1161 @Stable public long newArrayAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1162 @Stable public long newMultiArrayAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1163 @Stable public long dynamicNewArrayAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1164 @Stable public long registerFinalizerAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1165 @Stable public long threadIsInterruptedAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1166 @Stable public long vmMessageAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1167 @Stable public long identityHashCodeAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1168 @Stable public long exceptionHandlerForPcAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1169 @Stable public long exceptionHandlerForReturnAddressAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1170 @Stable public long osrMigrationEndAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1171 @Stable public long monitorenterAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1172 @Stable public long monitorexitAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1173 @Stable public long createNullPointerExceptionAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1174 @Stable public long createOutOfBoundsExceptionAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1175 @Stable public long logPrimitiveAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1176 @Stable public long logObjectAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1177 @Stable public long logPrintfAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1178 @Stable public long vmErrorAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1179 @Stable public long writeBarrierPreAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1180 @Stable public long writeBarrierPostAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1181 @Stable public long validateObject; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1182 @Stable public long javaTimeMillisAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1183 @Stable public long javaTimeNanosAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1184 @Stable public long arithmeticSinAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1185 @Stable public long arithmeticCosAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1186 @Stable public long arithmeticTanAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1187 @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
|
1188 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1189 @HotSpotVMConstant(name = "Deoptimization::Reason_none") @Stable public int deoptReasonNone; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1190 @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
|
1191 @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
|
1192 @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
|
1193 @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
|
1194 @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
|
1195 @HotSpotVMConstant(name = "Deoptimization::Reason_intrinsic") @Stable public int deoptReasonTypeCheckInlining; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1196 @HotSpotVMConstant(name = "Deoptimization::Reason_bimorphic") @Stable public int deoptReasonOptimizedTypeCheck; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1197 @HotSpotVMConstant(name = "Deoptimization::Reason_unhandled") @Stable public int deoptReasonNotCompiledExceptionHandler; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1198 @HotSpotVMConstant(name = "Deoptimization::Reason_uninitialized") @Stable public int deoptReasonUnresolved; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1199 @HotSpotVMConstant(name = "Deoptimization::Reason_age") @Stable public int deoptReasonJsrMismatch; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1200 @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
|
1201 @HotSpotVMConstant(name = "Deoptimization::Reason_constraint") @Stable public int deoptReasonConstraint; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1202 @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
|
1203 @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
|
1204 @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
|
1205 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1206 @HotSpotVMConstant(name = "Deoptimization::Action_none") @Stable public int deoptActionNone; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1207 @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
|
1208 @HotSpotVMConstant(name = "Deoptimization::Action_reinterpret") @Stable public int deoptActionReinterpret; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1209 @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
|
1210 @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
|
1211 |
13257
4eacfd0767ed
get deoptimization constants in HotSpotMetaAccessProvider from HotSpotVMConfig
twisti
parents:
13255
diff
changeset
|
1212 @HotSpotVMConstant(name = "Deoptimization::_action_bits") @Stable public int deoptimizationActionBits; |
4eacfd0767ed
get deoptimization constants in HotSpotMetaAccessProvider from HotSpotVMConfig
twisti
parents:
13255
diff
changeset
|
1213 @HotSpotVMConstant(name = "Deoptimization::_reason_bits") @Stable public int deoptimizationReasonBits; |
4eacfd0767ed
get deoptimization constants in HotSpotMetaAccessProvider from HotSpotVMConfig
twisti
parents:
13255
diff
changeset
|
1214 @HotSpotVMConstant(name = "Deoptimization::_speculation_id_bits") @Stable public int deoptimizationSpeculationIdBits; |
4eacfd0767ed
get deoptimization constants in HotSpotMetaAccessProvider from HotSpotVMConfig
twisti
parents:
13255
diff
changeset
|
1215 @HotSpotVMConstant(name = "Deoptimization::_action_shift") @Stable public int deoptimizationActionShift; |
4eacfd0767ed
get deoptimization constants in HotSpotMetaAccessProvider from HotSpotVMConfig
twisti
parents:
13255
diff
changeset
|
1216 @HotSpotVMConstant(name = "Deoptimization::_reason_shift") @Stable public int deoptimizationReasonShift; |
4eacfd0767ed
get deoptimization constants in HotSpotMetaAccessProvider from HotSpotVMConfig
twisti
parents:
13255
diff
changeset
|
1217 @HotSpotVMConstant(name = "Deoptimization::_speculation_id_shift") @Stable public int deoptimizationSpeculationIdShift; |
4eacfd0767ed
get deoptimization constants in HotSpotMetaAccessProvider from HotSpotVMConfig
twisti
parents:
13255
diff
changeset
|
1218 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1219 @HotSpotVMConstant(name = "vmIntrinsics::_invokeBasic") @Stable public int vmIntrinsicInvokeBasic; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1220 @HotSpotVMConstant(name = "vmIntrinsics::_linkToVirtual") @Stable public int vmIntrinsicLinkToVirtual; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1221 @HotSpotVMConstant(name = "vmIntrinsics::_linkToStatic") @Stable public int vmIntrinsicLinkToStatic; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1222 @HotSpotVMConstant(name = "vmIntrinsics::_linkToSpecial") @Stable public int vmIntrinsicLinkToSpecial; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1223 @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
|
1224 |
13170
f294b4ee2d47
make CodeInstallResult enum independent of the actual values in C++ code
twisti
parents:
13155
diff
changeset
|
1225 @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
|
1226 @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
|
1227 @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
|
1228 @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
|
1229 |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1230 public boolean check() { |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1231 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
|
1232 int modifiers = f.getModifiers(); |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1233 if (Modifier.isPublic(modifiers) && !Modifier.isStatic(modifiers)) { |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1234 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
|
1235 } |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1236 } |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1237 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1238 assert codeEntryAlignment > 0 : codeEntryAlignment; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1239 assert (layoutHelperArrayTagObjectValue & layoutHelperArrayTagTypeValue & arrayKlassLayoutHelperIdentifier) != 0 : "object array and type array must have first bit set"; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1240 |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1241 return true; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1242 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1243 } |