changeset 24106:1439a6614a10

8174957: [JVMCI] jaotc is broken in Xcomp mode
author Doug Simon <doug.simon@oracle.com>
date Wed, 15 Feb 2017 15:36:48 +0100
parents 1b7ea4ac489c
children 98eedf7e3648
files jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java src/share/vm/jvmci/jvmciJavaClasses.hpp
diffstat 4 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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<String, VMField> 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);
                 }
             }
--- 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);
             }
         }
--- 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.
--- 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;")                                                                                                              \