< prev index next >
test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java
Print this page
rev 12637 : 8174957: [JVMCI] jaotc is broken in Xcomp mode
*** 36,45 ****
--- 36,46 ----
*/
package compiler.jvmci.compilerToVM;
import jdk.test.lib.Asserts;
+ import jdk.vm.ci.hotspot.VMField;
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
import jdk.vm.ci.hotspot.HotSpotVMConfigAccess;
import jdk.vm.ci.hotspot.HotSpotVMConfigStore;
import jdk.vm.ci.hotspot.VMIntrinsicMethod;
*** 47,60 ****
public static void main(String args[]) {
new ReadConfigurationTest().runTest();
}
private void runTest() {
! TestHotSpotVMConfig config = new TestHotSpotVMConfig(HotSpotJVMCIRuntime.runtime().getConfigStore());
Asserts.assertNE(config.codeCacheHighBound, 0L, "Got null address");
Asserts.assertNE(config.stubRoutineJintArrayCopy, 0L, "Got null address");
for (VMIntrinsicMethod m : config.getStore().getIntrinsics()) {
Asserts.assertNotNull(m);
Asserts.assertNotNull(m.declaringClass);
Asserts.assertFalse(m.declaringClass.contains("."),
"declaringClass should be in class file format: " + m.declaringClass);
--- 48,70 ----
public static void main(String args[]) {
new ReadConfigurationTest().runTest();
}
private void runTest() {
! HotSpotVMConfigStore store = HotSpotJVMCIRuntime.runtime().getConfigStore();
! TestHotSpotVMConfig config = new TestHotSpotVMConfig(store);
Asserts.assertNE(config.codeCacheHighBound, 0L, "Got null address");
Asserts.assertNE(config.stubRoutineJintArrayCopy, 0L, "Got null address");
+ for (VMField field : store.getFields().values()) {
+ Object value = field.value;
+ if (value != null) {
+ Asserts.assertTrue(value instanceof Long || value instanceof Boolean,
+ "Got unexpected value type for VM field " + field.name + ": " + value.getClass());
+ }
+ }
+
for (VMIntrinsicMethod m : config.getStore().getIntrinsics()) {
Asserts.assertNotNull(m);
Asserts.assertNotNull(m.declaringClass);
Asserts.assertFalse(m.declaringClass.contains("."),
"declaringClass should be in class file format: " + m.declaringClass);
< prev index next >