# HG changeset patch # User Doug Simon # Date 1487169408 -3600 # Node ID 1439a6614a10e6050a866d4d69317514a9828d97 # Parent 1b7ea4ac489cc16ad034330eb1fb4ecfffe7cc6e 8174957: [JVMCI] jaotc is broken in Xcomp mode diff -r 1b7ea4ac489c -r 1439a6614a10 jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java --- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java Tue Feb 14 23:11:04 2017 +0100 +++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java Wed Feb 15 15:36:48 2017 +0100 @@ -76,7 +76,7 @@ HotSpotVMConfigStore store = runtime.getConfigStore(); for (Map.Entry e : store.getFields().entrySet()) { VMField field = e.getValue(); - if (field.isStatic() && field.value != null && field.value == address) { + if (field.isStatic() && field.value != null && field.value instanceof Long && ((Long) field.value) == address) { return e.getValue() + ":0x" + Long.toHexString(address); } } diff -r 1b7ea4ac489c -r 1439a6614a10 jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java --- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java Tue Feb 14 23:11:04 2017 +0100 +++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java Wed Feb 15 15:36:48 2017 +0100 @@ -496,7 +496,7 @@ if (!field.isStatic()) { printConfigLine(vm, "[vmconfig:instance field] %s %s {offset=%d[0x%x]}%n", field.type, field.name, field.offset, field.offset); } else { - String value = field.value == null ? "null" : String.format("%d[0x%x]", field.value, field.value); + String value = field.value == null ? "null" : field.value instanceof Boolean ? field.value.toString() : String.format("%d[0x%x]", field.value, field.value); printConfigLine(vm, "[vmconfig:static field] %s %s = %s {address=0x%x}%n", field.type, field.name, value, field.address); } } diff -r 1b7ea4ac489c -r 1439a6614a10 jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java --- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java Tue Feb 14 23:11:04 2017 +0100 +++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java Wed Feb 15 15:36:48 2017 +0100 @@ -38,22 +38,22 @@ public final String type; /** - * If represented field is non-static, this is its offset within the containing structure. + * If the represented field is non-static, this is its offset within the containing structure. */ public final long offset; /** - * If represented field is static, this is its address. Otherwise, this field is 0. + * If the represented field is static, this is its address. Otherwise, this is 0. */ public final long address; /** - * Value of the field represented as a boxed long; only valid for non-oop static fields. This - * value is only captured once, during JVMCI initialization. If {@link #type} cannot be - * meaningfully (e.g., a struct) or safely (e.g., an oop) expressed as a boxed long, this is - * {@code null}. + * Value of the field represented as a boxed boolean if its C++ type is bool otherwise as a + * boxed long; only valid for non-oop static fields. This value is only captured once, during + * JVMCI initialization. If {@link #type} cannot be meaningfully (e.g., a struct) or safely + * (e.g., an oop) expressed as a boxed object, this is {@code null}. */ - public final Long value; + public final Object value; /** * Determines if the represented field is static. diff -r 1b7ea4ac489c -r 1439a6614a10 src/share/vm/jvmci/jvmciJavaClasses.hpp --- a/src/share/vm/jvmci/jvmciJavaClasses.hpp Tue Feb 14 23:11:04 2017 +0100 +++ b/src/share/vm/jvmci/jvmciJavaClasses.hpp Wed Feb 15 15:36:48 2017 +0100 @@ -115,7 +115,7 @@ oop_field(VMField, type, "Ljava/lang/String;") \ long_field(VMField, offset) \ long_field(VMField, address) \ - oop_field(VMField, value, "Ljava/lang/Long;") \ + oop_field(VMField, value, "Ljava/lang/Object;") \ end_class \ start_class(VMFlag) \ oop_field(VMFlag, name, "Ljava/lang/String;") \