Mercurial > hg > graal-compiler
annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java @ 13241:8b5852df0471
remove CompilerToVM.initializeMethodData
author | twisti |
---|---|
date | Tue, 03 Dec 2013 14:48:09 -0800 |
parents | 51e97f88c771 |
children | 65c0f2ec1ad7 |
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(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
76 VMFields.Field entry = vmFields.get(name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
77 if (entry == null) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
78 if (annotation.optional()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
79 continue; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
80 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
81 throw new IllegalArgumentException("field not found: " + name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
82 } |
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 switch (annotation.get()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
85 case OFFSET: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
86 setField(f, entry.getOffset()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
87 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
88 case ADDRESS: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
89 setField(f, entry.getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
90 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
91 case VALUE: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
92 setField(f, entry.getValue()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
93 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
94 default: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
95 throw GraalInternalError.shouldNotReachHere("unknown kind " + annotation.get()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
96 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
97 } else if (f.isAnnotationPresent(HotSpotVMType.class)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
98 HotSpotVMType annotation = f.getAnnotation(HotSpotVMType.class); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
99 String name = annotation.name(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
100 VMTypes.Type entry = vmTypes.get(name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
101 if (entry == null) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
102 throw new IllegalArgumentException("type not found: " + name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
103 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
104 switch (annotation.get()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
105 case SIZE: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
106 setField(f, entry.getSize()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
107 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
108 default: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
109 throw GraalInternalError.shouldNotReachHere("unknown kind " + annotation.get()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
110 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
111 } else if (f.isAnnotationPresent(HotSpotVMConstant.class)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
112 HotSpotVMConstant annotation = f.getAnnotation(HotSpotVMConstant.class); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
113 String name = annotation.name(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
114 AbstractConstant entry = vmConstants.get(name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
115 if (entry == null) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
116 if (annotation.optional()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
117 continue; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
118 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
119 throw new IllegalArgumentException("constant not found: " + name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
120 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
121 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
122 setField(f, entry.getValue()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
123 } else if (f.isAnnotationPresent(HotSpotVMFlag.class)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
124 HotSpotVMFlag annotation = f.getAnnotation(HotSpotVMFlag.class); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
125 String name = annotation.name(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
126 Flags.Flag entry = flags.get(name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
127 if (entry == null) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
128 if (annotation.optional()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
129 continue; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
130 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
131 throw new IllegalArgumentException("flag not found: " + name); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
132 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
133 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
134 setField(f, entry.getValue()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
135 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
136 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
137 |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
138 assert check(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
139 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
140 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
141 private void setField(Field field, Object value) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
142 try { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
143 Class<?> fieldType = field.getType(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
144 if (fieldType == boolean.class) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
145 if (value instanceof String) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
146 field.setBoolean(this, Boolean.valueOf((String) value)); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
147 } else if (value instanceof Boolean) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
148 field.setBoolean(this, (boolean) value); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
149 } else if (value instanceof Long) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
150 field.setBoolean(this, ((long) value) != 0); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
151 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
152 GraalInternalError.shouldNotReachHere(value.getClass().getSimpleName()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
153 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
154 } else if (fieldType == int.class) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
155 if (value instanceof Integer) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
156 field.setInt(this, (int) value); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
157 } else if (value instanceof Long) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
158 field.setInt(this, (int) (long) value); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
159 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
160 GraalInternalError.shouldNotReachHere(value.getClass().getSimpleName()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
161 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
162 } else if (fieldType == long.class) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
163 field.setLong(this, (long) value); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
164 } else { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
165 GraalInternalError.shouldNotReachHere(field.toString()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
166 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
167 } catch (IllegalAccessException e) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
168 throw GraalInternalError.shouldNotReachHere(field.toString() + ": " + e); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
169 } |
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 |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
172 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
173 * VMStructEntry (see vmStructs.hpp). |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
174 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
175 private long gHotSpotVMStructs; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
176 private long gHotSpotVMStructEntryTypeNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
177 private long gHotSpotVMStructEntryFieldNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
178 private long gHotSpotVMStructEntryTypeStringOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
179 private long gHotSpotVMStructEntryIsStaticOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
180 private long gHotSpotVMStructEntryOffsetOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
181 private long gHotSpotVMStructEntryAddressOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
182 private long gHotSpotVMStructEntryArrayStride; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
183 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
184 class VMFields implements Iterable<VMFields.Field> { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
185 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
186 private long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
187 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
188 public VMFields(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
189 this.address = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
190 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
191 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
192 public Iterator<VMFields.Field> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
193 return new Iterator<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 int index = 0; |
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 private Field current() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
198 return new Field(address + gHotSpotVMStructEntryArrayStride * index); |
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 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
202 * The last entry is identified by a NULL fieldName. |
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 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
205 Field entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
206 return entry.getFieldName() != null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
207 } |
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 public Field next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
210 Field entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
211 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
212 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
213 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
214 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
215 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
216 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
217 throw GraalInternalError.unimplemented(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
218 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
219 }; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
220 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
221 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
222 class Field { |
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 private long entryAddress; |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
225 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
226 Field(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
227 this.entryAddress = address; |
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 public String getTypeName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
231 long typeNameAddress = unsafe.getAddress(entryAddress + gHotSpotVMStructEntryTypeNameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
232 return readCStringAsString(typeNameAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
233 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
234 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
235 public String getFieldName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
236 long fieldNameAddress = unsafe.getAddress(entryAddress + gHotSpotVMStructEntryFieldNameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
237 return readCStringAsString(fieldNameAddress); |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
240 public String getTypeString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
241 long typeStringAddress = unsafe.getAddress(entryAddress + gHotSpotVMStructEntryTypeStringOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
242 return readCStringAsString(typeStringAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
243 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
244 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
245 public boolean isStatic() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
246 return unsafe.getInt(entryAddress + gHotSpotVMStructEntryIsStaticOffset) != 0; |
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 long getOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
250 return unsafe.getLong(entryAddress + gHotSpotVMStructEntryOffsetOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
251 } |
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 public long getAddress() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
254 return unsafe.getAddress(entryAddress + gHotSpotVMStructEntryAddressOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
255 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
256 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
257 public String getName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
258 String typeName = getTypeName(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
259 String fieldName = getFieldName(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
260 return typeName + "::" + fieldName; |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
263 public long getValue() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
264 String type = getTypeString(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
265 switch (type) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
266 case "int": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
267 return unsafe.getInt(getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
268 case "address": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
269 case "intptr_t": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
270 return unsafe.getAddress(getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
271 default: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
272 // All foo* types are addresses. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
273 if (type.endsWith("*")) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
274 return unsafe.getAddress(getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
275 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
276 throw GraalInternalError.shouldNotReachHere(type); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
277 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
278 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
279 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
280 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
281 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
282 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
|
283 getAddress()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
284 } |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
285 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
286 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
287 |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
288 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
289 * VMTypeEntry (see vmStructs.hpp). |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
290 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
291 private long gHotSpotVMTypes; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
292 private long gHotSpotVMTypeEntryTypeNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
293 private long gHotSpotVMTypeEntrySuperclassNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
294 private long gHotSpotVMTypeEntryIsOopTypeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
295 private long gHotSpotVMTypeEntryIsIntegerTypeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
296 private long gHotSpotVMTypeEntryIsUnsignedOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
297 private long gHotSpotVMTypeEntrySizeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
298 private long gHotSpotVMTypeEntryArrayStride; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
299 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
300 class VMTypes implements Iterable<VMTypes.Type> { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
301 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
302 private long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
303 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
304 public VMTypes(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
305 this.address = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
306 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
307 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
308 public Iterator<VMTypes.Type> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
309 return new Iterator<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 int index = 0; |
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 private Type current() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
314 return new Type(address + gHotSpotVMTypeEntryArrayStride * index); |
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 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
318 * 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
|
319 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
320 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
321 Type entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
322 return entry.getTypeName() != null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
323 } |
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 public Type next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
326 Type entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
327 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
328 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
329 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
330 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
331 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
332 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
333 throw GraalInternalError.unimplemented(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
334 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
335 }; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
336 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
337 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
338 class Type { |
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 private long entryAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
341 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
342 Type(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
343 this.entryAddress = address; |
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 public String getTypeName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
347 long typeNameAddress = unsafe.getAddress(entryAddress + gHotSpotVMTypeEntryTypeNameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
348 return readCStringAsString(typeNameAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
349 } |
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 public String getSuperclassName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
352 long superclassNameAddress = unsafe.getAddress(entryAddress + gHotSpotVMTypeEntrySuperclassNameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
353 return readCStringAsString(superclassNameAddress); |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
356 public boolean isOopType() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
357 return unsafe.getInt(entryAddress + gHotSpotVMTypeEntryIsOopTypeOffset) != 0; |
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 boolean isIntegerType() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
361 return unsafe.getInt(entryAddress + gHotSpotVMTypeEntryIsIntegerTypeOffset) != 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
362 } |
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 public boolean isUnsigned() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
365 return unsafe.getInt(entryAddress + gHotSpotVMTypeEntryIsUnsignedOffset) != 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
366 } |
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 public long getSize() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
369 return unsafe.getLong(entryAddress + gHotSpotVMTypeEntrySizeOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
370 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
371 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
372 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
373 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
374 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
|
375 isUnsigned(), getSize()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
376 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
377 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
378 } |
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 public abstract class AbstractConstant { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
381 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
382 protected long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
383 protected long nameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
384 protected long valueOffset; |
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 AbstractConstant(long address, long nameOffset, long valueOffset) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
387 this.address = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
388 this.nameOffset = nameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
389 this.valueOffset = valueOffset; |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
392 public String getName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
393 long nameAddress = unsafe.getAddress(address + nameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
394 return readCStringAsString(nameAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
395 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
396 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
397 public abstract long getValue(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
398 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
399 |
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 * VMIntConstantEntry (see vmStructs.hpp). |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
402 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
403 private long gHotSpotVMIntConstants; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
404 private long gHotSpotVMIntConstantEntryNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
405 private long gHotSpotVMIntConstantEntryValueOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
406 private long gHotSpotVMIntConstantEntryArrayStride; |
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 class VMIntConstants implements Iterable<VMIntConstants.Constant> { |
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 private long address; |
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 public VMIntConstants(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
413 this.address = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
414 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
415 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
416 public Iterator<VMIntConstants.Constant> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
417 return new Iterator<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 int index = 0; |
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 private Constant current() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
422 return new Constant(address + gHotSpotVMIntConstantEntryArrayStride * index); |
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 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
426 * The last entry is identified by a NULL name. |
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 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
429 Constant entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
430 return entry.getName() != null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
431 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
432 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
433 public Constant next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
434 Constant entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
435 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
436 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
437 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
438 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
439 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
440 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
441 throw GraalInternalError.unimplemented(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
442 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
443 }; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
444 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
445 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
446 class Constant extends AbstractConstant { |
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 Constant(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
449 super(address, gHotSpotVMIntConstantEntryNameOffset, gHotSpotVMIntConstantEntryValueOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
450 } |
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 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
453 public long getValue() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
454 return unsafe.getInt(address + valueOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
455 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
456 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
457 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
458 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
459 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
|
460 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
461 } |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
462 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
463 |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
464 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
465 * VMLongConstantEntry (see vmStructs.hpp). |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
466 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
467 private long gHotSpotVMLongConstants; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
468 private long gHotSpotVMLongConstantEntryNameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
469 private long gHotSpotVMLongConstantEntryValueOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
470 private long gHotSpotVMLongConstantEntryArrayStride; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
471 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
472 class VMLongConstants implements Iterable<VMLongConstants.Constant> { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
473 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
474 private long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
475 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
476 public VMLongConstants(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
477 this.address = address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
478 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
479 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
480 public Iterator<VMLongConstants.Constant> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
481 return new Iterator<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 int index = 0; |
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 private Constant currentEntry() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
486 return new Constant(address + gHotSpotVMLongConstantEntryArrayStride * index); |
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 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
490 * The last entry is identified by a NULL name. |
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 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
493 Constant entry = currentEntry(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
494 return entry.getName() != null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
495 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
496 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
497 public Constant next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
498 Constant entry = currentEntry(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
499 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
500 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
501 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
502 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
503 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
504 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
505 throw GraalInternalError.unimplemented(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
506 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
507 }; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
508 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
509 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
510 class Constant extends AbstractConstant { |
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 Constant(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
513 super(address, gHotSpotVMLongConstantEntryNameOffset, gHotSpotVMLongConstantEntryValueOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
514 } |
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 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
517 public long getValue() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
518 return unsafe.getLong(address + valueOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
519 } |
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 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
522 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
523 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
|
524 } |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
525 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
526 } |
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
527 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
528 class Flags implements Iterable<Flags.Flag> { |
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 private long address; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
531 private long entrySize; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
532 private long typeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
533 private long nameOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
534 private long addrOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
535 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
536 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
|
537 address = vmStructs.get("Flag::flags").getValue(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
538 entrySize = vmTypes.get("Flag").getSize(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
539 typeOffset = vmStructs.get("Flag::_type").getOffset(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
540 nameOffset = vmStructs.get("Flag::_name").getOffset(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
541 addrOffset = vmStructs.get("Flag::_addr").getOffset(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
542 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
543 // 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
|
544 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
|
545 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
|
546 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
|
547 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
548 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
549 public Iterator<Flags.Flag> iterator() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
550 return new Iterator<Flags.Flag>() { |
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 private int index = 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
553 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
554 private Flag current() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
555 return new Flag(address + entrySize * index); |
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 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
559 * The last entry is identified by a NULL name. |
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 public boolean hasNext() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
562 Flag entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
563 return entry.getName() != null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
564 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
565 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
566 public Flag next() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
567 Flag entry = current(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
568 index++; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
569 return entry; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
570 } |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
571 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
572 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
573 public void remove() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
574 throw GraalInternalError.unimplemented(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
575 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
576 }; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
577 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
578 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
579 class Flag { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
580 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
581 private long entryAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
582 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
583 Flag(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
584 this.entryAddress = address; |
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 public String getType() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
588 long typeAddress = unsafe.getAddress(entryAddress + typeOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
589 return readCStringAsString(typeAddress); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
590 } |
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 public String getName() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
593 long nameAddress = unsafe.getAddress(entryAddress + nameOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
594 return readCStringAsString(nameAddress); |
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 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
597 public long getAddr() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
598 return unsafe.getAddress(entryAddress + addrOffset); |
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 Object getValue() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
602 switch (getType()) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
603 case "bool": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
604 return Boolean.valueOf(unsafe.getByte(getAddr()) != 0); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
605 case "intx": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
606 case "uintx": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
607 case "uint64_t": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
608 return Long.valueOf(unsafe.getLong(getAddr())); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
609 case "double": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
610 return Double.valueOf(unsafe.getDouble(getAddr())); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
611 case "ccstr": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
612 case "ccstrlist": |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
613 return readCStringAsString(getAddr()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
614 default: |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
615 throw GraalInternalError.shouldNotReachHere(getType()); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
616 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
617 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
618 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
619 @Override |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
620 public String toString() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
621 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
|
622 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
623 } |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
624 } |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
625 |
12559
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 * 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
|
628 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
629 private static String readCStringAsString(long address) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
630 if (address == 0) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
631 return null; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
632 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
633 StringBuffer sb = new StringBuffer(); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
634 for (int i = 0;; i++) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
635 char c = (char) unsafe.getByte(address + i); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
636 if (c == 0) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
637 break; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
638 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
639 sb.append(c); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
640 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
641 return sb.toString(); |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
642 } |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
643 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
644 // os information, register layout, code generation, ... |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
645 @HotSpotVMConstant(name = "ASSERT") @Stable public boolean cAssertions; |
9585 | 646 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
|
647 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
648 @HotSpotVMFlag(name = "CodeEntryAlignment") @Stable public int codeEntryAlignment; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
649 @HotSpotVMFlag(name = "VerifyOops") @Stable public boolean verifyOops; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
650 @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
|
651 @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
|
652 @HotSpotVMFlag(name = "CompileThreshold") @Stable public long compileThreshold; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
653 @HotSpotVMFlag(name = "CompileTheWorld") @Stable public boolean compileTheWorld; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
654 @HotSpotVMFlag(name = "CompileTheWorldStartAt") @Stable public int compileTheWorldStartAt; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
655 @HotSpotVMFlag(name = "CompileTheWorldStopAt") @Stable public int compileTheWorldStopAt; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
656 @HotSpotVMFlag(name = "PrintCompilation") @Stable public boolean printCompilation; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
657 @HotSpotVMFlag(name = "PrintInlining") @Stable public boolean printInlining; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
658 @HotSpotVMFlag(name = "GraalUseFastLocking") @Stable public boolean useFastLocking; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
659 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
660 @HotSpotVMFlag(name = "UseTLAB") @Stable public boolean useTLAB; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
661 @HotSpotVMFlag(name = "UseBiasedLocking") @Stable public boolean useBiasedLocking; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
662 @HotSpotVMFlag(name = "UsePopCountInstruction") @Stable public boolean usePopCountInstruction; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
663 @HotSpotVMFlag(name = "UseAESIntrinsics") @Stable public boolean useAESIntrinsics; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
664 @HotSpotVMFlag(name = "UseCRC32Intrinsics") @Stable public boolean useCRC32Intrinsics; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
665 @HotSpotVMFlag(name = "UseG1GC") @Stable public boolean useG1GC; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
666 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
667 @HotSpotVMField(name = "Universe::_collectedHeap", get = HotSpotVMField.Type.VALUE) @Stable private long universeCollectedHeap; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
668 @HotSpotVMField(name = "CollectedHeap::_total_collections", get = HotSpotVMField.Type.OFFSET) @Stable private int collectedHeapTotalCollectionsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
669 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
670 public long gcTotalCollectionsAddress() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
671 return universeCollectedHeap + collectedHeapTotalCollectionsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
672 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
673 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
674 @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
|
675 @HotSpotVMFlag(name = "GraalHProfEnabled") @Stable public boolean useHeapProfiler; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
676 |
9883
477fb9a9a06d
Delegate compressed oop arguments from HotSpot to Graal
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
9820
diff
changeset
|
677 // Compressed Oops related values. |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
678 @HotSpotVMFlag(name = "UseCompressedOops") @Stable public boolean useCompressedOops; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
679 @HotSpotVMFlag(name = "UseCompressedClassPointers") @Stable public boolean useCompressedClassPointers; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
680 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
681 @HotSpotVMField(name = "Universe::_narrow_oop._base", get = HotSpotVMField.Type.VALUE) @Stable public long narrowOopBase; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
682 @HotSpotVMField(name = "Universe::_narrow_oop._shift", get = HotSpotVMField.Type.VALUE) @Stable public int narrowOopShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
683 @HotSpotVMFlag(name = "ObjectAlignmentInBytes") @Stable public int objectAlignment; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
684 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
685 public int logMinObjAlignment() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
686 return (int) (Math.log(objectAlignment) / Math.log(2)); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
687 } |
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 @HotSpotVMField(name = "Universe::_narrow_klass._base", get = HotSpotVMField.Type.VALUE) @Stable public long narrowKlassBase; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
690 @HotSpotVMField(name = "Universe::_narrow_klass._shift", get = HotSpotVMField.Type.VALUE) @Stable public int narrowKlassShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
691 @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
|
692 |
9189
0331f7512be2
CPU capability detection.
Roland Schatz <roland.schatz@oracle.com>
parents:
9108
diff
changeset
|
693 // CPU capabilities |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
694 @HotSpotVMFlag(name = "UseSSE") @Stable public int useSSE; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
695 @HotSpotVMFlag(name = "UseAVX", optional = true) @Stable public int useAVX; |
9189
0331f7512be2
CPU capability detection.
Roland Schatz <roland.schatz@oracle.com>
parents:
9108
diff
changeset
|
696 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
697 // offsets, ... |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
698 @HotSpotVMFlag(name = "StackShadowPages") @Stable public int stackShadowPages; |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
699 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
700 @HotSpotVMField(name = "oopDesc::_mark", get = HotSpotVMField.Type.OFFSET) @Stable public int markOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
701 @HotSpotVMField(name = "oopDesc::_metadata._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
|
702 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
703 @HotSpotVMField(name = "Klass::_prototype_header", get = HotSpotVMField.Type.OFFSET) @Stable public int prototypeMarkWordOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
704 @HotSpotVMField(name = "Klass::_subklass", get = HotSpotVMField.Type.OFFSET) @Stable public int subklassOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
705 @HotSpotVMField(name = "Klass::_next_sibling", get = HotSpotVMField.Type.OFFSET) @Stable public int nextSiblingOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
706 @HotSpotVMField(name = "Klass::_super_check_offset", get = HotSpotVMField.Type.OFFSET) @Stable public int superCheckOffsetOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
707 @HotSpotVMField(name = "Klass::_secondary_super_cache", get = HotSpotVMField.Type.OFFSET) @Stable public int secondarySuperCacheOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
708 @HotSpotVMField(name = "Klass::_secondary_supers", 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
|
709 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
710 @HotSpotVMType(name = "vtableEntry", get = HotSpotVMType.Type.SIZE) @Stable public int vtableEntrySize; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
711 @HotSpotVMField(name = "vtableEntry::_method", get = HotSpotVMField.Type.OFFSET) @Stable public int vtableEntryMethodOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
712 @Stable public int instanceKlassVtableStartOffset; |
7037
dd81042f4eb1
added unit tests for ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
6950
diff
changeset
|
713 |
dd81042f4eb1
added unit tests for ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
6950
diff
changeset
|
714 /** |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
715 * 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
|
716 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
717 @Stable public int arrayLengthOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
718 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
719 @HotSpotVMField(name = "Array<Klass*>::_length", get = HotSpotVMField.Type.OFFSET) @Stable public int metaspaceArrayLengthOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
720 @HotSpotVMField(name = "Array<Klass*>::_data", 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
|
721 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
722 @HotSpotVMField(name = "InstanceKlass::_init_state", get = HotSpotVMField.Type.OFFSET) @Stable public int klassStateOffset; |
13214
3f34b8f91cc5
moved CompilerToVM.isTypeInitialized and isTypeLinked to Java
twisti
parents:
13182
diff
changeset
|
723 @HotSpotVMConstant(name = "InstanceKlass::linked") @Stable public int klassStateLinked; |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
724 @HotSpotVMConstant(name = "InstanceKlass::fully_initialized") @Stable public int klassStateFullyInitialized; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
725 @HotSpotVMField(name = "InstanceKlass::_constants", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassConstantsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
726 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
727 @HotSpotVMField(name = "ObjArrayKlass::_element_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
|
728 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
729 @HotSpotVMField(name = "Thread::_tlab", 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
|
730 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
731 @HotSpotVMField(name = "JavaThread::_anchor", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadAnchorOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
732 @HotSpotVMField(name = "JavaThread::_threadObj", get = HotSpotVMField.Type.OFFSET) @Stable public int threadObjectOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
733 @HotSpotVMField(name = "JavaThread::_osthread", get = HotSpotVMField.Type.OFFSET) @Stable public int osThreadOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
734 @HotSpotVMField(name = "JavaThread::_dirty_card_queue", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadDirtyCardQueueOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
735 @HotSpotVMField(name = "JavaThread::_is_method_handle_return", get = HotSpotVMField.Type.OFFSET) @Stable public int threadIsMethodHandleReturnOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
736 @HotSpotVMField(name = "JavaThread::_satb_mark_queue", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadSatbMarkQueueOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
737 @HotSpotVMField(name = "JavaThread::_vm_result", get = HotSpotVMField.Type.OFFSET) @Stable public int threadObjectResultOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
738 @HotSpotVMField(name = "JavaThread::_graal_counters[0]", 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
|
739 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
740 @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
|
741 |
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
742 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
743 * 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
|
744 * exception handling for compiled code. |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
745 * <p> |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
746 * <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
|
747 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
748 @HotSpotVMField(name = "JavaThread::_exception_oop", get = HotSpotVMField.Type.OFFSET) @Stable public int threadExceptionOopOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
749 @HotSpotVMField(name = "JavaThread::_exception_pc", 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
|
750 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
751 @HotSpotVMField(name = "JavaFrameAnchor::_last_Java_sp", get = HotSpotVMField.Type.OFFSET) @Stable private int javaFrameAnchorLastJavaSpOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
752 @HotSpotVMField(name = "JavaFrameAnchor::_last_Java_pc", get = HotSpotVMField.Type.OFFSET) @Stable private int javaFrameAnchorLastJavaPcOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
753 @HotSpotVMField(name = "JavaFrameAnchor::_last_Java_fp", get = HotSpotVMField.Type.OFFSET, optional = true) @Stable private int javaFrameAnchorLastJavaFpOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
754 @HotSpotVMField(name = "JavaFrameAnchor::_flags", 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
|
755 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
756 public int threadLastJavaSpOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
757 return javaThreadAnchorOffset + javaFrameAnchorLastJavaSpOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
758 } |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
759 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
760 public int threadLastJavaPcOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
761 return javaThreadAnchorOffset + javaFrameAnchorLastJavaPcOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
762 } |
5760
87e8baf5447c
added snippets for lowering array creation and initialization (in NewObjectSnippets)
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
763 |
9562
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9519
diff
changeset
|
764 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
765 * 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
|
766 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
767 public int threadLastJavaFpOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
768 // TODO add an assert for AMD64 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
769 return javaThreadAnchorOffset + javaFrameAnchorLastJavaFpOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
770 } |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
771 |
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
772 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
773 * 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
|
774 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
775 public int threadJavaFrameAnchorFlagsOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
776 // TODO add an assert for SPARC |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
777 return javaThreadAnchorOffset + javaFrameAnchorFlagsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
778 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
779 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
780 @HotSpotVMField(name = "PtrQueue::_active", get = HotSpotVMField.Type.OFFSET) @Stable public int ptrQueueActiveOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
781 @HotSpotVMField(name = "PtrQueue::_buf", get = HotSpotVMField.Type.OFFSET) @Stable public int ptrQueueBufferOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
782 @HotSpotVMField(name = "PtrQueue::_index", get = HotSpotVMField.Type.OFFSET) @Stable public int ptrQueueIndexOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
783 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
784 @HotSpotVMField(name = "OSThread::_interrupted", 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
|
785 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
786 @HotSpotVMConstant(name = "markOopDesc::unlocked_value") @Stable public int unlockedMask; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
787 @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
|
788 @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
|
789 @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
|
790 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
791 @HotSpotVMConstant(name = "markOopDesc::hash_shift") @Stable public long markOopDescHashShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
792 @HotSpotVMConstant(name = "markOopDesc::hash_mask") @Stable public long markOopDescHashMask; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
793 @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
|
794 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
795 @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
|
796 @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
|
797 @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
|
798 |
abeeb57b655d
added MonitorSnippets which passes MonitorTest but is not yet enabled for general lowering
Doug Simon <doug.simon@oracle.com>
parents:
6375
diff
changeset
|
799 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
800 * 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
|
801 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
802 public long arrayPrototypeMarkWord() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
803 return markWordNoHashInPlace | markWordNoLockInPlace; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
804 } |
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
|
805 |
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 * 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
|
808 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
809 public long tlabIntArrayMarkWord() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
810 long tmp = arrayPrototypeMarkWord() & (~markOopDescHashMaskInPlace); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
811 tmp |= ((0x2 & markOopDescHashMask) << markOopDescHashShift); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
812 return tmp; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
813 } |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
814 |
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
815 /** |
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
|
816 * 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
|
817 * 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
|
818 * <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
|
819 * <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
|
820 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
821 @HotSpotVMField(name = "ThreadShadow::_pending_exception", get = HotSpotVMField.Type.OFFSET) @Stable public int pendingExceptionOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
822 @HotSpotVMField(name = "ThreadShadow::_pending_deoptimization", 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
|
823 |
37977d1dcedc
Transmit deoptimization reason in thread local.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
8127
diff
changeset
|
824 /** |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
825 * Mark word right shift to get identity hash code. |
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
826 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
827 @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
|
828 |
a323a9e20f9d
Fixed a few race conditions in the compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10026
diff
changeset
|
829 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
830 * 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
|
831 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
832 @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
|
833 |
291ffc492eb6
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
Doug Simon <doug.simon@oracle.com>
parents:
7154
diff
changeset
|
834 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
835 * 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
|
836 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
837 @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
|
838 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
839 @HotSpotVMField(name = "Method::_access_flags", get = HotSpotVMField.Type.OFFSET) @Stable public int methodAccessFlagsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
840 @HotSpotVMField(name = "Method::_constMethod", get = HotSpotVMField.Type.OFFSET) @Stable public int methodConstMethodOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
841 @HotSpotVMField(name = "Method::_intrinsic_id", get = HotSpotVMField.Type.OFFSET) @Stable public int methodIntrinsicIdOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
842 @HotSpotVMField(name = "Method::_vtable_index", 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
|
843 |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9693
diff
changeset
|
844 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
845 * 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
|
846 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
847 @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
|
848 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
849 @HotSpotVMField(name = "ConstMethod::_max_stack", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodMaxStackOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
850 @HotSpotVMField(name = "ConstMethod::_max_locals", get = HotSpotVMField.Type.OFFSET) @Stable public int methodMaxLocalsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
851 @HotSpotVMField(name = "ConstMethod::_constants", 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
|
852 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
853 @HotSpotVMField(name = "ConstantPool::_pool_holder", get = HotSpotVMField.Type.OFFSET) @Stable public int constantPoolHolderOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
854 @HotSpotVMField(name = "ConstantPool::_length", get = HotSpotVMField.Type.OFFSET) @Stable public int constantPoolLengthOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
855 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
856 @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
|
857 |
10771 | 858 /** |
859 * Bit pattern that represents a non-oop. Neither the high bits nor the low bits of this value | |
860 * are allowed to look like (respectively) the high or low bits of a real oop. | |
861 */ | |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
862 @HotSpotVMField(name = "Universe::_non_oop_bits", get = HotSpotVMField.Type.VALUE) @Stable public long nonOopBits; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
863 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
864 @HotSpotVMField(name = "StubRoutines::_verify_oop_count", get = HotSpotVMField.Type.ADDRESS) @Stable public long verifyOopCounterAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
865 @Stable public long verifyOopMask; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
866 @Stable public long verifyOopBits; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
867 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
868 @HotSpotVMField(name = "CollectedHeap::_barrier_set", get = HotSpotVMField.Type.OFFSET) @Stable public int collectedHeapBarrierSetOffset; |
10771 | 869 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
870 @HotSpotVMField(name = "HeapRegion::LogOfHRGrainBytes", get = HotSpotVMField.Type.VALUE) @Stable public int logOfHRGrainBytes; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
871 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
872 @HotSpotVMField(name = "BarrierSet::_kind", get = HotSpotVMField.Type.OFFSET) @Stable public int barrierSetKindOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
873 @HotSpotVMConstant(name = "BarrierSet::CardTableModRef") @Stable public int barrierSetCardTableModRef; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
874 @HotSpotVMConstant(name = "BarrierSet::CardTableExtension") @Stable public int barrierSetCardTableExtension; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
875 @HotSpotVMConstant(name = "BarrierSet::G1SATBCT") @Stable public int barrierSetG1SATBCT; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
876 @HotSpotVMConstant(name = "BarrierSet::G1SATBCTLogging") @Stable public int barrierSetG1SATBCTLogging; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
877 @HotSpotVMConstant(name = "BarrierSet::ModRef") @Stable public int barrierSetModRef; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
878 @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
|
879 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
880 @HotSpotVMField(name = "CardTableModRefBS::byte_map_base", get = HotSpotVMField.Type.OFFSET) @Stable public int cardTableModRefBSByteMapBaseOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
881 @HotSpotVMConstant(name = "CardTableModRefBS::card_shift") @Stable public int cardTableModRefBSCardShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
882 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
883 public long cardtableStartAddress() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
884 final long barrierSetAddress = unsafe.getAddress(universeCollectedHeap + collectedHeapBarrierSetOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
885 final int kind = unsafe.getInt(barrierSetAddress + barrierSetKindOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
886 if ((kind == barrierSetCardTableModRef) || (kind == barrierSetCardTableExtension) || (kind == barrierSetG1SATBCT) || (kind == barrierSetG1SATBCTLogging)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
887 final long base = unsafe.getAddress(barrierSetAddress + cardTableModRefBSByteMapBaseOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
888 assert base != 0 : "unexpected byte_map_base: " + base; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
889 return base; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
890 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
891 if ((kind == barrierSetModRef) || (kind == barrierSetOther)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
892 // No post barriers |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
893 return 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
894 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
895 throw GraalInternalError.shouldNotReachHere("kind: " + kind); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
896 } |
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
|
897 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
898 public int cardtableShift() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
899 final long barrierSetAddress = unsafe.getAddress(universeCollectedHeap + collectedHeapBarrierSetOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
900 final int kind = unsafe.getInt(barrierSetAddress + barrierSetKindOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
901 if ((kind == barrierSetCardTableModRef) || (kind == barrierSetCardTableExtension) || (kind == barrierSetG1SATBCT) || (kind == barrierSetG1SATBCTLogging)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
902 return cardTableModRefBSCardShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
903 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
904 if ((kind == barrierSetModRef) || (kind == barrierSetOther)) { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
905 // No post barriers |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
906 return 0; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
907 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
908 throw GraalInternalError.shouldNotReachHere("kind: " + kind); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
909 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
910 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
911 @HotSpotVMField(name = "os::_polling_page", get = HotSpotVMField.Type.VALUE) @Stable public long safepointPollingAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
912 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
913 // 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
|
914 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
915 public int g1CardQueueIndexOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
916 return javaThreadDirtyCardQueueOffset + ptrQueueIndexOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
917 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
918 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
919 public int g1CardQueueBufferOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
920 return javaThreadDirtyCardQueueOffset + ptrQueueBufferOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
921 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
922 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
923 public int g1SATBQueueMarkingOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
924 return javaThreadSatbMarkQueueOffset + ptrQueueActiveOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
925 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
926 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
927 public int g1SATBQueueIndexOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
928 return javaThreadSatbMarkQueueOffset + ptrQueueIndexOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
929 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
930 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
931 public int g1SATBQueueBufferOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
932 return javaThreadSatbMarkQueueOffset + ptrQueueBufferOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
933 } |
8490
1567c6cc6561
Towards porting G1 WBs
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
8489
diff
changeset
|
934 |
1567c6cc6561
Towards porting G1 WBs
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
8489
diff
changeset
|
935 /** |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
936 * 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
|
937 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
938 @HotSpotVMField(name = "Klass::_java_mirror", 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
|
939 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
940 @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
|
941 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
942 @HotSpotVMField(name = "Klass::_super", get = HotSpotVMField.Type.OFFSET) @Stable public int klassSuperKlassOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
943 @HotSpotVMField(name = "Klass::_modifier_flags", get = HotSpotVMField.Type.OFFSET) @Stable public int klassModifierFlagsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
944 @HotSpotVMField(name = "Klass::_access_flags", get = HotSpotVMField.Type.OFFSET) @Stable public int klassAccessFlagsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
945 @HotSpotVMField(name = "Klass::_layout_helper", get = HotSpotVMField.Type.OFFSET) @Stable public int klassLayoutHelperOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
946 @HotSpotVMField(name = "Klass::_layout_helper", get = HotSpotVMField.Type.OFFSET) @Stable public int klassInstanceSizeOffset; |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
947 |
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
948 /** |
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
949 * 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
|
950 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
951 public final int arrayKlassLayoutHelperIdentifier = 0x80000000; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
952 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
953 @HotSpotVMField(name = "ArrayKlass::_component_mirror", get = HotSpotVMField.Type.OFFSET) @Stable public int arrayKlassComponentMirrorOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
954 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
955 @HotSpotVMField(name = "java_lang_Class::_klass_offset", get = HotSpotVMField.Type.VALUE) @Stable public int klassOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
956 @HotSpotVMField(name = "java_lang_Class::_array_klass_offset", get = HotSpotVMField.Type.VALUE) @Stable public int arrayKlassOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
957 @HotSpotVMField(name = "java_lang_Class::_graal_mirror_offset", get = HotSpotVMField.Type.VALUE) @Stable public int graalMirrorInClassOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
958 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
959 @HotSpotVMField(name = "Method::_method_data", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
960 @HotSpotVMField(name = "Method::_from_compiled_entry", get = HotSpotVMField.Type.OFFSET) @Stable public int methodCompiledEntryOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
961 |
13241 | 962 @HotSpotVMField(name = "MethodData::_size", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataSize; |
963 @HotSpotVMField(name = "MethodData::_data_size", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataDataSize; | |
964 @HotSpotVMField(name = "MethodData::_data[0]", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOopDataOffset; | |
965 @HotSpotVMField(name = "MethodData::_trap_hist._array[0]", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOopTrapHistoryOffset; | |
966 | |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
967 @HotSpotVMField(name = "nmethod::_verified_entry_point", get = HotSpotVMField.Type.OFFSET) @Stable public int nmethodEntryOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
968 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
969 @HotSpotVMType(name = "BasicLock", get = HotSpotVMType.Type.SIZE) @Stable public int basicLockSize; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
970 @HotSpotVMField(name = "BasicLock::_displaced_header", get = HotSpotVMField.Type.OFFSET) @Stable public int basicLockDisplacedHeaderOffset; |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
971 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
972 @Stable public long heapEndAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
973 @Stable public long heapTopAddress; |
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 @HotSpotVMField(name = "Thread::_allocated_bytes", get = HotSpotVMField.Type.OFFSET) @Stable public int threadAllocatedBytesOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
976 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
977 @HotSpotVMFlag(name = "TLABWasteIncrement") @Stable public int tlabRefillWasteIncrement; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
978 @Stable public int tlabAlignmentReserve; |
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 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_start", get = HotSpotVMField.Type.OFFSET) @Stable public int threadLocalAllocBufferStartOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
981 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_end", get = HotSpotVMField.Type.OFFSET) @Stable public int threadLocalAllocBufferEndOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
982 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_top", get = HotSpotVMField.Type.OFFSET) @Stable public int threadLocalAllocBufferTopOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
983 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_slow_allocations", get = HotSpotVMField.Type.OFFSET) @Stable public int threadLocalAllocBufferSlowAllocationsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
984 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_fast_refill_waste", get = HotSpotVMField.Type.OFFSET) @Stable public int threadLocalAllocBufferFastRefillWasteOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
985 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_number_of_refills", get = HotSpotVMField.Type.OFFSET) @Stable public int threadLocalAllocBufferNumberOfRefillsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
986 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_refill_waste_limit", get = HotSpotVMField.Type.OFFSET) @Stable public int threadLocalAllocBufferRefillWasteLimitOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
987 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_desired_size", get = HotSpotVMField.Type.OFFSET) @Stable public int threadLocalAllocBufferDesiredSizeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
988 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
989 public int tlabSlowAllocationsOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
990 return threadTlabOffset + threadLocalAllocBufferSlowAllocationsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
991 } |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
992 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
993 public int tlabFastRefillWasteOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
994 return threadTlabOffset + threadLocalAllocBufferFastRefillWasteOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
995 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
996 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
997 public int tlabNumberOfRefillsOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
998 return threadTlabOffset + threadLocalAllocBufferNumberOfRefillsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
999 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1000 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1001 public int tlabRefillWasteLimitOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1002 return threadTlabOffset + threadLocalAllocBufferRefillWasteLimitOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1003 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1004 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1005 public int threadTlabSizeOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1006 return threadTlabOffset + threadLocalAllocBufferDesiredSizeOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1007 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1008 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1009 public int threadTlabStartOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1010 return threadTlabOffset + threadLocalAllocBufferStartOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1011 } |
7220
fcae6d960acd
added more compiler intrinsics
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7125
diff
changeset
|
1012 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1013 public int threadTlabEndOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1014 return threadTlabOffset + threadLocalAllocBufferEndOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1015 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1016 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1017 public int threadTlabTopOffset() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1018 return threadTlabOffset + threadLocalAllocBufferTopOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1019 } |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1020 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1021 @HotSpotVMFlag(name = "TLABStats") @Stable public boolean tlabStats; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1022 @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
|
1023 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1024 @HotSpotVMField(name = "Klass::_layout_helper", get = HotSpotVMField.Type.OFFSET) @Stable public int layoutHelperOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1025 @HotSpotVMConstant(name = "Klass::_lh_log2_element_size_shift") @Stable public int layoutHelperLog2ElementSizeShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1026 @HotSpotVMConstant(name = "Klass::_lh_log2_element_size_mask") @Stable public int layoutHelperLog2ElementSizeMask; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1027 @HotSpotVMConstant(name = "Klass::_lh_element_type_shift") @Stable public int layoutHelperElementTypeShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1028 @HotSpotVMConstant(name = "Klass::_lh_element_type_mask") @Stable public int layoutHelperElementTypeMask; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1029 @HotSpotVMConstant(name = "Klass::_lh_header_size_shift") @Stable public int layoutHelperHeaderSizeShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1030 @HotSpotVMConstant(name = "Klass::_lh_header_size_mask") @Stable public int layoutHelperHeaderSizeMask; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1031 @HotSpotVMConstant(name = "Klass::_lh_array_tag_shift") @Stable public int layoutHelperArrayTagShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1032 @HotSpotVMConstant(name = "Klass::_lh_array_tag_type_value") @Stable public int layoutHelperArrayTagTypeValue; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1033 @HotSpotVMConstant(name = "Klass::_lh_array_tag_obj_value") @Stable public int layoutHelperArrayTagObjectValue; |
10026
2beeb916aa31
Add arrayKlassOffset field to HotSpotVMConfig.
Roland Schatz <roland.schatz@oracle.com>
parents:
9992
diff
changeset
|
1034 |
2beeb916aa31
Add arrayKlassOffset field to HotSpotVMConfig.
Roland Schatz <roland.schatz@oracle.com>
parents:
9992
diff
changeset
|
1035 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1036 * This filters out the bit that differentiates a type array from an object array. |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
1037 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1038 public int layoutHelperElementTypePrimitiveInPlace() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1039 return (layoutHelperArrayTagTypeValue & ~layoutHelperArrayTagObjectValue) << layoutHelperArrayTagShift; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1040 } |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6674
diff
changeset
|
1041 |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
1042 /** |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1043 * The DataLayout header size is the same as the cell size. |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
1044 */ |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1045 @HotSpotVMConstant(name = "DataLayout::cell_size") @Stable public int dataLayoutHeaderSize; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1046 @HotSpotVMField(name = "DataLayout::_header._struct._tag", get = HotSpotVMField.Type.OFFSET) @Stable public int dataLayoutTagOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1047 @HotSpotVMField(name = "DataLayout::_header._struct._flags", get = HotSpotVMField.Type.OFFSET) @Stable public int dataLayoutFlagsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1048 @HotSpotVMField(name = "DataLayout::_header._struct._bci", get = HotSpotVMField.Type.OFFSET) @Stable public int dataLayoutBCIOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1049 @HotSpotVMField(name = "DataLayout::_cells[0]", get = HotSpotVMField.Type.OFFSET) @Stable public int dataLayoutCellsOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1050 @HotSpotVMConstant(name = "DataLayout::cell_size") @Stable public int dataLayoutCellSize; |
10897
9c4f90e48c60
read HotSpot VM options via HotSpotDiagnosticMXBean
twisti
parents:
10772
diff
changeset
|
1051 |
13182 | 1052 @HotSpotVMConstant(name = "DataLayout::no_tag") @Stable public int dataLayoutNoTag; |
1053 @HotSpotVMConstant(name = "DataLayout::bit_data_tag") @Stable public int dataLayoutBitDataTag; | |
1054 @HotSpotVMConstant(name = "DataLayout::counter_data_tag") @Stable public int dataLayoutCounterDataTag; | |
1055 @HotSpotVMConstant(name = "DataLayout::jump_data_tag") @Stable public int dataLayoutJumpDataTag; | |
1056 @HotSpotVMConstant(name = "DataLayout::receiver_type_data_tag") @Stable public int dataLayoutReceiverTypeDataTag; | |
1057 @HotSpotVMConstant(name = "DataLayout::virtual_call_data_tag") @Stable public int dataLayoutVirtualCallDataTag; | |
1058 @HotSpotVMConstant(name = "DataLayout::ret_data_tag") @Stable public int dataLayoutRetDataTag; | |
1059 @HotSpotVMConstant(name = "DataLayout::branch_data_tag") @Stable public int dataLayoutBranchDataTag; | |
1060 @HotSpotVMConstant(name = "DataLayout::multi_branch_data_tag") @Stable public int dataLayoutMultiBranchDataTag; | |
1061 @HotSpotVMConstant(name = "DataLayout::arg_info_data_tag") @Stable public int dataLayoutArgInfoDataTag; | |
1062 @HotSpotVMConstant(name = "DataLayout::call_type_data_tag") @Stable public int dataLayoutCallTypeDataTag; | |
1063 @HotSpotVMConstant(name = "DataLayout::virtual_call_type_data_tag") @Stable public int dataLayoutVirtualCallTypeDataTag; | |
1064 @HotSpotVMConstant(name = "DataLayout::parameters_type_data_tag") @Stable public int dataLayoutParametersTypeDataTag; | |
1065 | |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1066 @HotSpotVMFlag(name = "BciProfileWidth") @Stable public int bciProfileWidth; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1067 @HotSpotVMFlag(name = "TypeProfileWidth") @Stable public int typeProfileWidth; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1068 @HotSpotVMFlag(name = "MethodProfileWidth") @Stable public int methodProfileWidth; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1069 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1070 @HotSpotVMField(name = "CodeBlob::_code_offset", get = HotSpotVMField.Type.OFFSET) @Stable private int codeBlobCodeOffsetOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1071 @HotSpotVMField(name = "SharedRuntime::_ic_miss_blob", get = HotSpotVMField.Type.VALUE) @Stable private long inlineCacheMissBlob; |
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 long inlineCacheMissStub() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1074 return inlineCacheMissBlob + unsafe.getInt(inlineCacheMissBlob + codeBlobCodeOffsetOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1075 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1076 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1077 @HotSpotVMField(name = "CodeCache::_heap", get = HotSpotVMField.Type.VALUE) @Stable private long codeCacheHeap; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1078 @HotSpotVMField(name = "CodeHeap::_memory", get = HotSpotVMField.Type.OFFSET) @Stable private int codeHeapMemoryOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1079 @HotSpotVMField(name = "VirtualSpace::_low_boundary", get = HotSpotVMField.Type.OFFSET) @Stable private int virtualSpaceLowBoundaryOffset; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1080 @HotSpotVMField(name = "VirtualSpace::_high_boundary", 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
|
1081 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1082 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1083 * @return CodeCache::_heap->_memory._low_boundary |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1084 */ |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1085 public long codeCacheLowBoundary() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1086 return unsafe.getAddress(codeCacheHeap + codeHeapMemoryOffset + virtualSpaceLowBoundaryOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1087 } |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1088 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1089 /** |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1090 * @return CodeCache::_heap->_memory._high_boundary |
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 public long codeCacheHighBoundary() { |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1093 return unsafe.getAddress(codeCacheHeap + codeHeapMemoryOffset + virtualSpaceHighBoundaryOffset); |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1094 } |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4199
diff
changeset
|
1095 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1096 @Stable public long handleDeoptStub; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1097 @Stable public long uncommonTrapStub; |
8502
ff4fa8b0516e
-Create push patch
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
8499
diff
changeset
|
1098 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1099 @HotSpotVMField(name = "StubRoutines::_aescrypt_encryptBlock", get = HotSpotVMField.Type.VALUE) @Stable public long aescryptEncryptBlockStub; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1100 @HotSpotVMField(name = "StubRoutines::_aescrypt_decryptBlock", get = HotSpotVMField.Type.VALUE) @Stable public long aescryptDecryptBlockStub; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1101 @HotSpotVMField(name = "StubRoutines::_cipherBlockChaining_encryptAESCrypt", get = HotSpotVMField.Type.VALUE) @Stable public long cipherBlockChainingEncryptAESCryptStub; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1102 @HotSpotVMField(name = "StubRoutines::_cipherBlockChaining_decryptAESCrypt", get = HotSpotVMField.Type.VALUE) @Stable public long cipherBlockChainingDecryptAESCryptStub; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1103 @HotSpotVMField(name = "StubRoutines::_updateBytesCRC32", get = HotSpotVMField.Type.VALUE) @Stable public long updateBytesCRC32Stub; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1104 @HotSpotVMField(name = "StubRoutines::_crc_table_adr", 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
|
1105 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1106 @Stable public long newInstanceAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1107 @Stable public long newArrayAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1108 @Stable public long newMultiArrayAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1109 @Stable public long dynamicNewArrayAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1110 @Stable public long registerFinalizerAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1111 @Stable public long threadIsInterruptedAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1112 @Stable public long vmMessageAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1113 @Stable public long identityHashCodeAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1114 @Stable public long exceptionHandlerForPcAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1115 @Stable public long exceptionHandlerForReturnAddressAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1116 @Stable public long osrMigrationEndAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1117 @Stable public long monitorenterAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1118 @Stable public long monitorexitAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1119 @Stable public long createNullPointerExceptionAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1120 @Stable public long createOutOfBoundsExceptionAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1121 @Stable public long logPrimitiveAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1122 @Stable public long logObjectAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1123 @Stable public long logPrintfAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1124 @Stable public long vmErrorAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1125 @Stable public long writeBarrierPreAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1126 @Stable public long writeBarrierPostAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1127 @Stable public long validateObject; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1128 @Stable public long javaTimeMillisAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1129 @Stable public long javaTimeNanosAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1130 @Stable public long arithmeticSinAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1131 @Stable public long arithmeticCosAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1132 @Stable public long arithmeticTanAddress; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1133 @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
|
1134 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1135 @HotSpotVMConstant(name = "Deoptimization::Reason_none") @Stable public int deoptReasonNone; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1136 @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
|
1137 @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
|
1138 @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
|
1139 @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
|
1140 @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
|
1141 @HotSpotVMConstant(name = "Deoptimization::Reason_intrinsic") @Stable public int deoptReasonTypeCheckInlining; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1142 @HotSpotVMConstant(name = "Deoptimization::Reason_bimorphic") @Stable public int deoptReasonOptimizedTypeCheck; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1143 @HotSpotVMConstant(name = "Deoptimization::Reason_unhandled") @Stable public int deoptReasonNotCompiledExceptionHandler; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1144 @HotSpotVMConstant(name = "Deoptimization::Reason_uninitialized") @Stable public int deoptReasonUnresolved; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1145 @HotSpotVMConstant(name = "Deoptimization::Reason_age") @Stable public int deoptReasonJsrMismatch; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1146 @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
|
1147 @HotSpotVMConstant(name = "Deoptimization::Reason_constraint") @Stable public int deoptReasonConstraint; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1148 @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
|
1149 @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
|
1150 @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
|
1151 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1152 @HotSpotVMConstant(name = "Deoptimization::Action_none") @Stable public int deoptActionNone; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1153 @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
|
1154 @HotSpotVMConstant(name = "Deoptimization::Action_reinterpret") @Stable public int deoptActionReinterpret; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1155 @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
|
1156 @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
|
1157 |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1158 @HotSpotVMConstant(name = "vmIntrinsics::_invokeBasic") @Stable public int vmIntrinsicInvokeBasic; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1159 @HotSpotVMConstant(name = "vmIntrinsics::_linkToVirtual") @Stable public int vmIntrinsicLinkToVirtual; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1160 @HotSpotVMConstant(name = "vmIntrinsics::_linkToStatic") @Stable public int vmIntrinsicLinkToStatic; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1161 @HotSpotVMConstant(name = "vmIntrinsics::_linkToSpecial") @Stable public int vmIntrinsicLinkToSpecial; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1162 @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
|
1163 |
13170
f294b4ee2d47
make CodeInstallResult enum independent of the actual values in C++ code
twisti
parents:
13155
diff
changeset
|
1164 @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
|
1165 @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
|
1166 @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
|
1167 @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
|
1168 |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1169 public boolean check() { |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1170 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
|
1171 int modifiers = f.getModifiers(); |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1172 if (Modifier.isPublic(modifiers) && !Modifier.isStatic(modifiers)) { |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1173 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
|
1174 } |
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1175 } |
12559
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1176 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1177 assert codeEntryAlignment > 0 : codeEntryAlignment; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1178 assert stackShadowPages > 0 : stackShadowPages; |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1179 |
ae412befde21
read HotSpotVMConfig fields from HotSpot's vmStructs via annotations
twisti
parents:
12372
diff
changeset
|
1180 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
|
1181 |
11430
a7dd2d728500
made all public, non-static fields in HotSpotVMConfig final
Doug Simon <doug.simon@oracle.com>
parents:
11238
diff
changeset
|
1182 return true; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1183 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1184 } |