8134994: use separate VMStructs databases for SA and JVMCI
authortwisti
Mon, 14 Dec 2015 17:02:02 -1000
changeset 35123 b0b89d83bcf5
parent 35121 e8900e5763ff
child 35124 a337c8af2b4b
8134994: use separate VMStructs databases for SA and JVMCI Reviewed-by: kbarrett
hotspot/src/cpu/x86/vm/vm_version_x86.hpp
hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java
hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java
hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java
hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspotvmconfig/src/jdk/vm/ci/hotspotvmconfig/HotSpotVMManual.java
hotspot/src/share/vm/classfile/javaClasses.hpp
hotspot/src/share/vm/classfile/vmSymbols.hpp
hotspot/src/share/vm/code/codeBlob.hpp
hotspot/src/share/vm/code/codeCache.hpp
hotspot/src/share/vm/code/nmethod.hpp
hotspot/src/share/vm/compiler/compileTask.hpp
hotspot/src/share/vm/gc/g1/vmStructs_g1.hpp
hotspot/src/share/vm/gc/shared/collectedHeap.hpp
hotspot/src/share/vm/gc/shared/threadLocalAllocBuffer.hpp
hotspot/src/share/vm/jvmci/jvmciCodeInstaller.hpp
hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp
hotspot/src/share/vm/jvmci/jvmciCompilerToVM.hpp
hotspot/src/share/vm/jvmci/jvmciEnv.hpp
hotspot/src/share/vm/jvmci/jvmciRuntime.cpp
hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp
hotspot/src/share/vm/jvmci/vmStructs_jvmci.hpp
hotspot/src/share/vm/oops/constMethod.hpp
hotspot/src/share/vm/oops/constantPool.hpp
hotspot/src/share/vm/oops/instanceKlass.hpp
hotspot/src/share/vm/oops/klass.hpp
hotspot/src/share/vm/oops/klassVtable.hpp
hotspot/src/share/vm/oops/method.hpp
hotspot/src/share/vm/oops/methodCounters.hpp
hotspot/src/share/vm/oops/methodData.hpp
hotspot/src/share/vm/oops/objArrayKlass.hpp
hotspot/src/share/vm/oops/oop.hpp
hotspot/src/share/vm/runtime/basicLock.hpp
hotspot/src/share/vm/runtime/deoptimization.hpp
hotspot/src/share/vm/runtime/javaFrameAnchor.hpp
hotspot/src/share/vm/runtime/os.hpp
hotspot/src/share/vm/runtime/osThread.hpp
hotspot/src/share/vm/runtime/thread.hpp
hotspot/src/share/vm/runtime/vmStructs.cpp
hotspot/src/share/vm/runtime/vmStructs.hpp
hotspot/src/share/vm/utilities/array.hpp
hotspot/src/share/vm/utilities/exceptions.hpp
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -30,6 +30,7 @@
 
 class VM_Version : public Abstract_VM_Version {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 public:
   // cpuid result register layouts.  These are all unions of a uint32_t
   // (in case anyone wants access to the register as a whole) and a bitfield.
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java	Mon Dec 14 17:02:02 2015 -1000
@@ -190,7 +190,7 @@
 
     @Override
     public boolean isSynthetic() {
-        return (config().syntheticFlag & modifiers) != 0;
+        return (config().jvmAccSynthetic & modifiers) != 0;
     }
 
     /**
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java	Mon Dec 14 17:02:02 2015 -1000
@@ -324,8 +324,7 @@
 
     @Override
     public boolean hasFinalizer() {
-        HotSpotVMConfig config = config();
-        return (getAccessFlags() & config.klassHasFinalizerFlag) != 0;
+        return (getAccessFlags() & config().jvmAccHasFinalizer) != 0;
     }
 
     @Override
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java	Mon Dec 14 17:02:02 2015 -1000
@@ -37,7 +37,6 @@
 import jdk.vm.ci.hotspotvmconfig.HotSpotVMData;
 import jdk.vm.ci.hotspotvmconfig.HotSpotVMField;
 import jdk.vm.ci.hotspotvmconfig.HotSpotVMFlag;
-import jdk.vm.ci.hotspotvmconfig.HotSpotVMManual;
 import jdk.vm.ci.hotspotvmconfig.HotSpotVMType;
 import sun.misc.Unsafe;
 
@@ -68,11 +67,11 @@
         assert gHotSpotVMData != 0;
 
         // Make FindBugs happy.
-        gHotSpotVMStructs = 0;
-        gHotSpotVMTypes = 0;
-        gHotSpotVMIntConstants = 0;
-        gHotSpotVMLongConstants = 0;
-        gHotSpotVMAddresses = 0;
+        jvmciHotSpotVMStructs = 0;
+        jvmciHotSpotVMTypes = 0;
+        jvmciHotSpotVMIntConstants = 0;
+        jvmciHotSpotVMLongConstants = 0;
+        jvmciHotSpotVMAddresses = 0;
 
         // Initialize the gHotSpotVM fields.
         for (Field f : HotSpotVMConfig.class.getDeclaredFields()) {
@@ -89,41 +88,17 @@
         }
 
         // Quick sanity check.
-        assert gHotSpotVMStructs != 0;
-        assert gHotSpotVMTypes != 0;
-        assert gHotSpotVMIntConstants != 0;
-        assert gHotSpotVMLongConstants != 0;
-        assert gHotSpotVMAddresses != 0;
+        assert jvmciHotSpotVMStructs != 0;
+        assert jvmciHotSpotVMTypes != 0;
+        assert jvmciHotSpotVMIntConstants != 0;
+        assert jvmciHotSpotVMLongConstants != 0;
+        assert jvmciHotSpotVMAddresses != 0;
 
         initialize();
 
         oopEncoding = new CompressEncoding(narrowOopBase, narrowOopShift, logMinObjAlignment());
         klassEncoding = new CompressEncoding(narrowKlassBase, narrowKlassShift, logKlassAlignment);
 
-        final long barrierSetAddress = UNSAFE.getAddress(universeCollectedHeap + collectedHeapBarrierSetOffset);
-        final int kind = UNSAFE.getInt(barrierSetAddress + barrierSetFakeRttiOffset + fakeRttiConcreteTagOffset);
-        if ((kind == barrierSetCardTableModRef) || (kind == barrierSetCardTableForRS) || (kind == barrierSetCardTableExtension) || (kind == barrierSetG1SATBCT) || (kind == barrierSetG1SATBCTLogging)) {
-            final long base = UNSAFE.getAddress(barrierSetAddress + cardTableModRefBSByteMapBaseOffset);
-            assert base != 0 : "unexpected byte_map_base: " + base;
-            cardtableStartAddress = base;
-            cardtableShift = cardTableModRefBSCardShift;
-        } else if (kind == barrierSetModRef) {
-            // No post barriers
-            cardtableStartAddress = 0;
-            cardtableShift = 0;
-        } else {
-            cardtableStartAddress = -1;
-            cardtableShift = -1;
-        }
-
-        // Now handle all HotSpotVMManual fields.
-        inlineCacheMissStub = inlineCacheMissBlob + UNSAFE.getInt(inlineCacheMissBlob + codeBlobCodeOffsetOffset);
-        handleWrongMethodStub = wrongMethodBlob + UNSAFE.getInt(wrongMethodBlob + codeBlobCodeOffsetOffset);
-        handleDeoptStub = deoptBlob + UNSAFE.getInt(deoptBlob + codeBlobCodeOffsetOffset) + UNSAFE.getInt(deoptBlob + deoptimizationBlobUnpackOffsetOffset);
-        uncommonTrapStub = deoptBlob + UNSAFE.getInt(deoptBlob + codeBlobCodeOffsetOffset) + UNSAFE.getInt(deoptBlob + deoptimizationBlobUncommonTrapOffsetOffset);
-
-        tlabAlignmentReserve = roundUp(threadLocalAllocBufferEndReserve(), minObjAlignment());
-
         assert check();
         assert HotSpotVMConfigVerifier.check();
     }
@@ -139,28 +114,28 @@
     private void initialize() {
         // Fill the VM fields hash map.
         HashMap<String, VMFields.Field> vmFields = new HashMap<>();
-        for (VMFields.Field e : new VMFields(gHotSpotVMStructs)) {
+        for (VMFields.Field e : new VMFields(jvmciHotSpotVMStructs)) {
             vmFields.put(e.getName(), e);
         }
 
         // Fill the VM types hash map.
         HashMap<String, VMTypes.Type> vmTypes = new HashMap<>();
-        for (VMTypes.Type e : new VMTypes(gHotSpotVMTypes)) {
+        for (VMTypes.Type e : new VMTypes(jvmciHotSpotVMTypes)) {
             vmTypes.put(e.getTypeName(), e);
         }
 
         // Fill the VM constants hash map.
         HashMap<String, AbstractConstant> vmConstants = new HashMap<>();
-        for (AbstractConstant e : new VMIntConstants(gHotSpotVMIntConstants)) {
+        for (AbstractConstant e : new VMIntConstants(jvmciHotSpotVMIntConstants)) {
             vmConstants.put(e.getName(), e);
         }
-        for (AbstractConstant e : new VMAddresses(gHotSpotVMLongConstants)) {
+        for (AbstractConstant e : new VMLongConstants(jvmciHotSpotVMLongConstants)) {
             vmConstants.put(e.getName(), e);
         }
 
         // Fill the VM addresses hash map.
         HashMap<String, VMAddresses.Address> vmAddresses = new HashMap<>();
-        for (VMAddresses.Address e : new VMAddresses(gHotSpotVMAddresses)) {
+        for (VMAddresses.Address e : new VMAddresses(jvmciHotSpotVMAddresses)) {
             vmAddresses.put(e.getName(), e);
         }
 
@@ -213,6 +188,7 @@
                 if (entry == null) {
                     throw new JVMCIError(f.getName() + ": expected VM type not found: " + name);
                 }
+
                 switch (annotation.get()) {
                     case SIZE:
                         setField(f, entry.getSize());
@@ -371,14 +347,14 @@
     /**
      * VMStructEntry (see {@code vmStructs.hpp}).
      */
-    @HotSpotVMData(index = 0) @Stable private long gHotSpotVMStructs;
-    @HotSpotVMData(index = 1) @Stable private long gHotSpotVMStructEntryTypeNameOffset;
-    @HotSpotVMData(index = 2) @Stable private long gHotSpotVMStructEntryFieldNameOffset;
-    @HotSpotVMData(index = 3) @Stable private long gHotSpotVMStructEntryTypeStringOffset;
-    @HotSpotVMData(index = 4) @Stable private long gHotSpotVMStructEntryIsStaticOffset;
-    @HotSpotVMData(index = 5) @Stable private long gHotSpotVMStructEntryOffsetOffset;
-    @HotSpotVMData(index = 6) @Stable private long gHotSpotVMStructEntryAddressOffset;
-    @HotSpotVMData(index = 7) @Stable private long gHotSpotVMStructEntryArrayStride;
+    @HotSpotVMData(index = 0) @Stable private long jvmciHotSpotVMStructs;
+    @HotSpotVMData(index = 1) @Stable private long jvmciHotSpotVMStructEntryTypeNameOffset;
+    @HotSpotVMData(index = 2) @Stable private long jvmciHotSpotVMStructEntryFieldNameOffset;
+    @HotSpotVMData(index = 3) @Stable private long jvmciHotSpotVMStructEntryTypeStringOffset;
+    @HotSpotVMData(index = 4) @Stable private long jvmciHotSpotVMStructEntryIsStaticOffset;
+    @HotSpotVMData(index = 5) @Stable private long jvmciHotSpotVMStructEntryOffsetOffset;
+    @HotSpotVMData(index = 6) @Stable private long jvmciHotSpotVMStructEntryAddressOffset;
+    @HotSpotVMData(index = 7) @Stable private long jvmciHotSpotVMStructEntryArrayStride;
 
     final class VMFields implements Iterable<VMFields.Field> {
 
@@ -394,7 +370,7 @@
                 private int index = 0;
 
                 private Field current() {
-                    return new Field(address + gHotSpotVMStructEntryArrayStride * index);
+                    return new Field(address + jvmciHotSpotVMStructEntryArrayStride * index);
                 }
 
                 /**
@@ -422,30 +398,30 @@
             }
 
             public String getTypeName() {
-                long typeNameAddress = UNSAFE.getAddress(entryAddress + gHotSpotVMStructEntryTypeNameOffset);
+                long typeNameAddress = UNSAFE.getAddress(entryAddress + jvmciHotSpotVMStructEntryTypeNameOffset);
                 return readCString(UNSAFE, typeNameAddress);
             }
 
             public String getFieldName() {
-                long fieldNameAddress = UNSAFE.getAddress(entryAddress + gHotSpotVMStructEntryFieldNameOffset);
+                long fieldNameAddress = UNSAFE.getAddress(entryAddress + jvmciHotSpotVMStructEntryFieldNameOffset);
                 return readCString(UNSAFE, fieldNameAddress);
             }
 
             public String getTypeString() {
-                long typeStringAddress = UNSAFE.getAddress(entryAddress + gHotSpotVMStructEntryTypeStringOffset);
+                long typeStringAddress = UNSAFE.getAddress(entryAddress + jvmciHotSpotVMStructEntryTypeStringOffset);
                 return readCString(UNSAFE, typeStringAddress);
             }
 
             public boolean isStatic() {
-                return UNSAFE.getInt(entryAddress + gHotSpotVMStructEntryIsStaticOffset) != 0;
+                return UNSAFE.getInt(entryAddress + jvmciHotSpotVMStructEntryIsStaticOffset) != 0;
             }
 
             public long getOffset() {
-                return UNSAFE.getLong(entryAddress + gHotSpotVMStructEntryOffsetOffset);
+                return UNSAFE.getLong(entryAddress + jvmciHotSpotVMStructEntryOffsetOffset);
             }
 
             public long getAddress() {
-                return UNSAFE.getAddress(entryAddress + gHotSpotVMStructEntryAddressOffset);
+                return UNSAFE.getAddress(entryAddress + jvmciHotSpotVMStructEntryAddressOffset);
             }
 
             public String getName() {
@@ -466,6 +442,7 @@
                     case "address":
                     case "intptr_t":
                     case "uintptr_t":
+                    case "size_t":
                         return UNSAFE.getAddress(getAddress());
                     default:
                         // All foo* types are addresses.
@@ -487,14 +464,14 @@
     /**
      * VMTypeEntry (see vmStructs.hpp).
      */
-    @HotSpotVMData(index = 8) @Stable private long gHotSpotVMTypes;
-    @HotSpotVMData(index = 9) @Stable private long gHotSpotVMTypeEntryTypeNameOffset;
-    @HotSpotVMData(index = 10) @Stable private long gHotSpotVMTypeEntrySuperclassNameOffset;
-    @HotSpotVMData(index = 11) @Stable private long gHotSpotVMTypeEntryIsOopTypeOffset;
-    @HotSpotVMData(index = 12) @Stable private long gHotSpotVMTypeEntryIsIntegerTypeOffset;
-    @HotSpotVMData(index = 13) @Stable private long gHotSpotVMTypeEntryIsUnsignedOffset;
-    @HotSpotVMData(index = 14) @Stable private long gHotSpotVMTypeEntrySizeOffset;
-    @HotSpotVMData(index = 15) @Stable private long gHotSpotVMTypeEntryArrayStride;
+    @HotSpotVMData(index = 8) @Stable private long jvmciHotSpotVMTypes;
+    @HotSpotVMData(index = 9) @Stable private long jvmciHotSpotVMTypeEntryTypeNameOffset;
+    @HotSpotVMData(index = 10) @Stable private long jvmciHotSpotVMTypeEntrySuperclassNameOffset;
+    @HotSpotVMData(index = 11) @Stable private long jvmciHotSpotVMTypeEntryIsOopTypeOffset;
+    @HotSpotVMData(index = 12) @Stable private long jvmciHotSpotVMTypeEntryIsIntegerTypeOffset;
+    @HotSpotVMData(index = 13) @Stable private long jvmciHotSpotVMTypeEntryIsUnsignedOffset;
+    @HotSpotVMData(index = 14) @Stable private long jvmciHotSpotVMTypeEntrySizeOffset;
+    @HotSpotVMData(index = 15) @Stable private long jvmciHotSpotVMTypeEntryArrayStride;
 
     final class VMTypes implements Iterable<VMTypes.Type> {
 
@@ -510,7 +487,7 @@
                 private int index = 0;
 
                 private Type current() {
-                    return new Type(address + gHotSpotVMTypeEntryArrayStride * index);
+                    return new Type(address + jvmciHotSpotVMTypeEntryArrayStride * index);
                 }
 
                 /**
@@ -538,29 +515,29 @@
             }
 
             public String getTypeName() {
-                long typeNameAddress = UNSAFE.getAddress(entryAddress + gHotSpotVMTypeEntryTypeNameOffset);
+                long typeNameAddress = UNSAFE.getAddress(entryAddress + jvmciHotSpotVMTypeEntryTypeNameOffset);
                 return readCString(UNSAFE, typeNameAddress);
             }
 
             public String getSuperclassName() {
-                long superclassNameAddress = UNSAFE.getAddress(entryAddress + gHotSpotVMTypeEntrySuperclassNameOffset);
+                long superclassNameAddress = UNSAFE.getAddress(entryAddress + jvmciHotSpotVMTypeEntrySuperclassNameOffset);
                 return readCString(UNSAFE, superclassNameAddress);
             }
 
             public boolean isOopType() {
-                return UNSAFE.getInt(entryAddress + gHotSpotVMTypeEntryIsOopTypeOffset) != 0;
+                return UNSAFE.getInt(entryAddress + jvmciHotSpotVMTypeEntryIsOopTypeOffset) != 0;
             }
 
             public boolean isIntegerType() {
-                return UNSAFE.getInt(entryAddress + gHotSpotVMTypeEntryIsIntegerTypeOffset) != 0;
+                return UNSAFE.getInt(entryAddress + jvmciHotSpotVMTypeEntryIsIntegerTypeOffset) != 0;
             }
 
             public boolean isUnsigned() {
-                return UNSAFE.getInt(entryAddress + gHotSpotVMTypeEntryIsUnsignedOffset) != 0;
+                return UNSAFE.getInt(entryAddress + jvmciHotSpotVMTypeEntryIsUnsignedOffset) != 0;
             }
 
             public long getSize() {
-                return UNSAFE.getLong(entryAddress + gHotSpotVMTypeEntrySizeOffset);
+                return UNSAFE.getLong(entryAddress + jvmciHotSpotVMTypeEntrySizeOffset);
             }
 
             @Override
@@ -594,10 +571,10 @@
     /**
      * VMIntConstantEntry (see vmStructs.hpp).
      */
-    @HotSpotVMData(index = 16) @Stable private long gHotSpotVMIntConstants;
-    @HotSpotVMData(index = 17) @Stable private long gHotSpotVMIntConstantEntryNameOffset;
-    @HotSpotVMData(index = 18) @Stable private long gHotSpotVMIntConstantEntryValueOffset;
-    @HotSpotVMData(index = 19) @Stable private long gHotSpotVMIntConstantEntryArrayStride;
+    @HotSpotVMData(index = 16) @Stable private long jvmciHotSpotVMIntConstants;
+    @HotSpotVMData(index = 17) @Stable private long jvmciHotSpotVMIntConstantEntryNameOffset;
+    @HotSpotVMData(index = 18) @Stable private long jvmciHotSpotVMIntConstantEntryValueOffset;
+    @HotSpotVMData(index = 19) @Stable private long jvmciHotSpotVMIntConstantEntryArrayStride;
 
     final class VMIntConstants implements Iterable<VMIntConstants.Constant> {
 
@@ -613,7 +590,7 @@
                 private int index = 0;
 
                 private Constant current() {
-                    return new Constant(address + gHotSpotVMIntConstantEntryArrayStride * index);
+                    return new Constant(address + jvmciHotSpotVMIntConstantEntryArrayStride * index);
                 }
 
                 /**
@@ -635,7 +612,7 @@
         final class Constant extends AbstractConstant {
 
             Constant(long address) {
-                super(address, gHotSpotVMIntConstantEntryNameOffset, gHotSpotVMIntConstantEntryValueOffset);
+                super(address, jvmciHotSpotVMIntConstantEntryNameOffset, jvmciHotSpotVMIntConstantEntryValueOffset);
             }
 
             @Override
@@ -653,10 +630,10 @@
     /**
      * VMLongConstantEntry (see vmStructs.hpp).
      */
-    @HotSpotVMData(index = 20) @Stable private long gHotSpotVMLongConstants;
-    @HotSpotVMData(index = 21) @Stable private long gHotSpotVMLongConstantEntryNameOffset;
-    @HotSpotVMData(index = 22) @Stable private long gHotSpotVMLongConstantEntryValueOffset;
-    @HotSpotVMData(index = 23) @Stable private long gHotSpotVMLongConstantEntryArrayStride;
+    @HotSpotVMData(index = 20) @Stable private long jvmciHotSpotVMLongConstants;
+    @HotSpotVMData(index = 21) @Stable private long jvmciHotSpotVMLongConstantEntryNameOffset;
+    @HotSpotVMData(index = 22) @Stable private long jvmciHotSpotVMLongConstantEntryValueOffset;
+    @HotSpotVMData(index = 23) @Stable private long jvmciHotSpotVMLongConstantEntryArrayStride;
 
     final class VMLongConstants implements Iterable<VMLongConstants.Constant> {
 
@@ -672,7 +649,7 @@
                 private int index = 0;
 
                 private Constant currentEntry() {
-                    return new Constant(address + gHotSpotVMLongConstantEntryArrayStride * index);
+                    return new Constant(address + jvmciHotSpotVMLongConstantEntryArrayStride * index);
                 }
 
                 /**
@@ -694,7 +671,7 @@
         final class Constant extends AbstractConstant {
 
             Constant(long address) {
-                super(address, gHotSpotVMLongConstantEntryNameOffset, gHotSpotVMLongConstantEntryValueOffset);
+                super(address, jvmciHotSpotVMLongConstantEntryNameOffset, jvmciHotSpotVMLongConstantEntryValueOffset);
             }
 
             @Override
@@ -712,10 +689,10 @@
     /**
      * VMAddressEntry (see vmStructs.hpp).
      */
-    @HotSpotVMData(index = 24) @Stable private long gHotSpotVMAddresses;
-    @HotSpotVMData(index = 25) @Stable private long gHotSpotVMAddressEntryNameOffset;
-    @HotSpotVMData(index = 26) @Stable private long gHotSpotVMAddressEntryValueOffset;
-    @HotSpotVMData(index = 27) @Stable private long gHotSpotVMAddressEntryArrayStride;
+    @HotSpotVMData(index = 24) @Stable private long jvmciHotSpotVMAddresses;
+    @HotSpotVMData(index = 25) @Stable private long jvmciHotSpotVMAddressEntryNameOffset;
+    @HotSpotVMData(index = 26) @Stable private long jvmciHotSpotVMAddressEntryValueOffset;
+    @HotSpotVMData(index = 27) @Stable private long jvmciHotSpotVMAddressEntryArrayStride;
 
     final class VMAddresses implements Iterable<VMAddresses.Address> {
 
@@ -731,7 +708,7 @@
                 private int index = 0;
 
                 private Address currentEntry() {
-                    return new Address(address + gHotSpotVMAddressEntryArrayStride * index);
+                    return new Address(address + jvmciHotSpotVMAddressEntryArrayStride * index);
                 }
 
                 /**
@@ -753,7 +730,7 @@
         final class Address extends AbstractConstant {
 
             Address(long address) {
-                super(address, gHotSpotVMAddressEntryNameOffset, gHotSpotVMAddressEntryValueOffset);
+                super(address, jvmciHotSpotVMAddressEntryNameOffset, jvmciHotSpotVMAddressEntryValueOffset);
             }
 
             @Override
@@ -896,7 +873,7 @@
 
     @HotSpotVMFlag(name = "FlightRecorder", optional = true) @Stable public boolean flightRecorder;
 
-    @HotSpotVMField(name = "Universe::_collectedHeap", type = "CollectedHeap*", get = HotSpotVMField.Type.VALUE) @Stable private long universeCollectedHeap;
+    @HotSpotVMField(name = "CompilerToVM::Data::Universe_collectedHeap", type = "CollectedHeap*", get = HotSpotVMField.Type.VALUE) @Stable private long universeCollectedHeap;
     @HotSpotVMField(name = "CollectedHeap::_total_collections", type = "unsigned int", get = HotSpotVMField.Type.OFFSET) @Stable private int collectedHeapTotalCollectionsOffset;
 
     public long gcTotalCollectionsAddress() {
@@ -909,8 +886,8 @@
     @HotSpotVMFlag(name = "UseCompressedOops") @Stable public boolean useCompressedOops;
     @HotSpotVMFlag(name = "UseCompressedClassPointers") @Stable public boolean useCompressedClassPointers;
 
-    @HotSpotVMField(name = "Universe::_narrow_oop._base", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long narrowOopBase;
-    @HotSpotVMField(name = "Universe::_narrow_oop._shift", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int narrowOopShift;
+    @HotSpotVMField(name = "CompilerToVM::Data::Universe_narrow_oop_base", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long narrowOopBase;
+    @HotSpotVMField(name = "CompilerToVM::Data::Universe_narrow_oop_shift", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int narrowOopShift;
     @HotSpotVMFlag(name = "ObjectAlignmentInBytes") @Stable public int objectAlignment;
 
     public final int minObjAlignment() {
@@ -922,16 +899,14 @@
     }
 
     @HotSpotVMType(name = "narrowKlass", get = HotSpotVMType.Type.SIZE) @Stable public int narrowKlassSize;
-    @HotSpotVMField(name = "Universe::_narrow_klass._base", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long narrowKlassBase;
-    @HotSpotVMField(name = "Universe::_narrow_klass._shift", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int narrowKlassShift;
+    @HotSpotVMField(name = "CompilerToVM::Data::Universe_narrow_klass_base", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long narrowKlassBase;
+    @HotSpotVMField(name = "CompilerToVM::Data::Universe_narrow_klass_shift", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int narrowKlassShift;
     @HotSpotVMConstant(name = "LogKlassAlignmentInBytes") @Stable public int logKlassAlignment;
 
     // CPU capabilities
     @HotSpotVMFlag(name = "UseSSE") @Stable public int useSSE;
     @HotSpotVMFlag(name = "UseAVX", archs = {"amd64"}) @Stable public int useAVX;
 
-    @HotSpotVMField(name = "Abstract_VM_Version::_reserve_for_allocation_prefetch", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int abstractVmVersionReserveForAllocationPrefetch;
-
     // X86 specific values
     @HotSpotVMField(name = "VM_Version::_cpuFeatures", type = "uint64_t", get = HotSpotVMField.Type.VALUE, archs = {"amd64"}) @Stable public long x86CPUFeatures;
     @HotSpotVMConstant(name = "VM_Version::CPU_CX8", archs = {"amd64"}) @Stable public long cpuCX8;
@@ -1054,7 +1029,8 @@
     @HotSpotVMField(name = "InstanceKlass::_init_state", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassInitStateOffset;
     @HotSpotVMField(name = "InstanceKlass::_constants", type = "ConstantPool*", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassConstantsOffset;
     @HotSpotVMField(name = "InstanceKlass::_fields", type = "Array<u2>*", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassFieldsOffset;
-    @HotSpotVMField(name = "InstanceKlass::_vtable_len", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassVtableLengthOffset;
+    @HotSpotVMField(name = "CompilerToVM::Data::InstanceKlass_vtable_start_offset", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int instanceKlassVtableStartOffset;
+    @HotSpotVMField(name = "CompilerToVM::Data::InstanceKlass_vtable_length_offset", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int instanceKlassVtableLengthOffset;
 
     @HotSpotVMConstant(name = "InstanceKlass::linked") @Stable public int instanceKlassStateLinked;
     @HotSpotVMConstant(name = "InstanceKlass::fully_initialized") @Stable public int instanceKlassStateFullyInitialized;
@@ -1063,12 +1039,7 @@
      * See {@code InstanceKlass::vtable_start_offset()}.
      */
     public final int instanceKlassVtableStartOffset() {
-        return roundUp(instanceKlassSize, heapWordSize);
-    }
-
-    // TODO use CodeUtil method once it's moved from NumUtil
-    private static int roundUp(int number, int mod) {
-        return ((number + mod - 1) / mod) * mod;
+        return instanceKlassVtableStartOffset * heapWordSize;
     }
 
     @HotSpotVMType(name = "arrayOopDesc", get = HotSpotVMType.Type.SIZE) @Stable public int arrayOopDescSize;
@@ -1100,11 +1071,22 @@
 
     @HotSpotVMConstant(name = "FIELDINFO_TAG_SIZE") @Stable public int fieldInfoTagSize;
 
+    @HotSpotVMConstant(name = "JVM_ACC_MONITOR_MATCH") @Stable public int jvmAccMonitorMatch;
+    @HotSpotVMConstant(name = "JVM_ACC_HAS_MONITOR_BYTECODES") @Stable public int jvmAccHasMonitorBytecodes;
+    @HotSpotVMConstant(name = "JVM_ACC_HAS_FINALIZER") @Stable public int jvmAccHasFinalizer;
     @HotSpotVMConstant(name = "JVM_ACC_FIELD_INTERNAL") @Stable public int jvmAccFieldInternal;
     @HotSpotVMConstant(name = "JVM_ACC_FIELD_STABLE") @Stable public int jvmAccFieldStable;
     @HotSpotVMConstant(name = "JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE") @Stable public int jvmAccFieldHasGenericSignature;
     @HotSpotVMConstant(name = "JVM_ACC_WRITTEN_FLAGS") @Stable public int jvmAccWrittenFlags;
 
+    // Modifier.SYNTHETIC is not public so we get it via vmStructs.
+    @HotSpotVMConstant(name = "JVM_ACC_SYNTHETIC") @Stable public int jvmAccSynthetic;
+
+    /**
+     * @see HotSpotResolvedObjectTypeImpl#createField
+     */
+    @HotSpotVMConstant(name = "JVM_RECOGNIZED_FIELD_MODIFIERS") @Stable public int recognizedFieldModifiers;
+
     @HotSpotVMField(name = "Thread::_tlab", type = "ThreadLocalAllocBuffer", get = HotSpotVMField.Type.OFFSET) @Stable public int threadTlabOffset;
 
     @HotSpotVMField(name = "JavaThread::_anchor", type = "JavaFrameAnchor", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadAnchorOffset;
@@ -1202,16 +1184,17 @@
 
     @HotSpotVMField(name = "OSThread::_interrupted", type = "jint", get = HotSpotVMField.Type.OFFSET) @Stable public int osThreadInterruptedOffset;
 
-    @HotSpotVMConstant(name = "markOopDesc::unlocked_value") @Stable public int unlockedMask;
+    @HotSpotVMConstant(name = "markOopDesc::hash_shift") @Stable public long markOopDescHashShift;
+
     @HotSpotVMConstant(name = "markOopDesc::biased_lock_mask_in_place") @Stable public int biasedLockMaskInPlace;
     @HotSpotVMConstant(name = "markOopDesc::age_mask_in_place") @Stable public int ageMaskInPlace;
     @HotSpotVMConstant(name = "markOopDesc::epoch_mask_in_place") @Stable public int epochMaskInPlace;
-
-    @HotSpotVMConstant(name = "markOopDesc::hash_shift") @Stable public long markOopDescHashShift;
     @HotSpotVMConstant(name = "markOopDesc::hash_mask") @Stable public long markOopDescHashMask;
     @HotSpotVMConstant(name = "markOopDesc::hash_mask_in_place") @Stable public long markOopDescHashMaskInPlace;
 
+    @HotSpotVMConstant(name = "markOopDesc::unlocked_value") @Stable public int unlockedMask;
     @HotSpotVMConstant(name = "markOopDesc::biased_lock_pattern") @Stable public int biasedLockPattern;
+
     @HotSpotVMConstant(name = "markOopDesc::no_hash_in_place") @Stable public int markWordNoHashInPlace;
     @HotSpotVMConstant(name = "markOopDesc::no_lock_in_place") @Stable public int markWordNoLockInPlace;
 
@@ -1247,6 +1230,11 @@
     @HotSpotVMField(name = "Method::_flags", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int methodFlagsOffset;
     @HotSpotVMField(name = "Method::_vtable_index", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodVtableIndexOffset;
 
+    @HotSpotVMField(name = "Method::_method_counters", type = "MethodCounters*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodCountersOffset;
+    @HotSpotVMField(name = "Method::_method_data", type = "MethodData*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOffset;
+    @HotSpotVMField(name = "Method::_from_compiled_entry", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable public int methodCompiledEntryOffset;
+    @HotSpotVMField(name = "Method::_code", type = "nmethod*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodCodeOffset;
+
     @HotSpotVMConstant(name = "Method::_jfr_towrite") @Stable public int methodFlagsJfrTowrite;
     @HotSpotVMConstant(name = "Method::_caller_sensitive") @Stable public int methodFlagsCallerSensitive;
     @HotSpotVMConstant(name = "Method::_force_inline") @Stable public int methodFlagsForceInline;
@@ -1255,16 +1243,29 @@
     @HotSpotVMConstant(name = "Method::nonvirtual_vtable_index") @Stable public int nonvirtualVtableIndex;
     @HotSpotVMConstant(name = "Method::invalid_vtable_index") @Stable public int invalidVtableIndex;
 
+    @HotSpotVMField(name = "MethodCounters::_invocation_counter", type = "InvocationCounter", get = HotSpotVMField.Type.OFFSET) @Stable public int invocationCounterOffset;
+    @HotSpotVMField(name = "MethodCounters::_backedge_counter", type = "InvocationCounter", get = HotSpotVMField.Type.OFFSET) @Stable public int backedgeCounterOffset;
+    @HotSpotVMConstant(name = "InvocationCounter::count_increment") @Stable public int invocationCounterIncrement;
+    @HotSpotVMConstant(name = "InvocationCounter::count_shift") @Stable public int invocationCounterShift;
+
+    @HotSpotVMField(name = "MethodData::_size", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataSize;
+    @HotSpotVMField(name = "MethodData::_data_size", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataDataSize;
+    @HotSpotVMField(name = "MethodData::_data[0]", type = "intptr_t", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOopDataOffset;
+    @HotSpotVMField(name = "MethodData::_trap_hist._array[0]", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOopTrapHistoryOffset;
+    @HotSpotVMField(name = "MethodData::_jvmci_ir_size", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataIRSizeOffset;
+
+    @HotSpotVMField(name = "nmethod::_verified_entry_point", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable public int nmethodEntryOffset;
+    @HotSpotVMField(name = "nmethod::_comp_level", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int nmethodCompLevelOffset;
+
+    @HotSpotVMConstant(name = "CompLevel_full_optimization") @Stable public int compilationLevelFullOptimization;
+
     @HotSpotVMConstant(name = "InvocationEntryBci") @Stable public int invocationEntryBci;
 
     @HotSpotVMField(name = "JVMCIEnv::_task", type = "CompileTask*", get = HotSpotVMField.Type.OFFSET) @Stable public int jvmciEnvTaskOffset;
     @HotSpotVMField(name = "JVMCIEnv::_jvmti_can_hotswap_or_post_breakpoint", type = "bool", get = HotSpotVMField.Type.OFFSET) @Stable public int jvmciEnvJvmtiCanHotswapOrPostBreakpointOffset;
     @HotSpotVMField(name = "CompileTask::_num_inlined_bytecodes", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int compileTaskNumInlinedBytecodesOffset;
 
-    /**
-     * See {@code Method::extra_stack_entries()}.
-     */
-    @HotSpotVMConstant(name = "Method::extra_stack_entries_for_jsr292") @Stable public int extraStackEntries;
+    @HotSpotVMField(name = "CompilerToVM::Data::Method_extra_stack_entries", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int extraStackEntries;
 
     @HotSpotVMField(name = "ConstMethod::_constants", type = "ConstantPool*", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodConstantsOffset;
     @HotSpotVMField(name = "ConstMethod::_flags", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodFlagsOffset;
@@ -1325,72 +1326,39 @@
     @HotSpotVMConstant(name = "HeapWordSize") @Stable public int heapWordSize;
 
     @HotSpotVMType(name = "Symbol*", get = HotSpotVMType.Type.SIZE) @Stable public int symbolPointerSize;
-    @HotSpotVMField(name = "Symbol::_length", type = "unsigned short", get = HotSpotVMField.Type.OFFSET) @Stable public int symbolLengthOffset;
-    @HotSpotVMField(name = "Symbol::_body[0]", type = "jbyte", get = HotSpotVMField.Type.OFFSET) @Stable public int symbolBodyOffset;
 
     @HotSpotVMField(name = "vmSymbols::_symbols[0]", type = "Symbol*", get = HotSpotVMField.Type.ADDRESS) @Stable public long vmSymbolsSymbols;
     @HotSpotVMConstant(name = "vmSymbols::FIRST_SID") @Stable public int vmSymbolsFirstSID;
     @HotSpotVMConstant(name = "vmSymbols::SID_LIMIT") @Stable public int vmSymbolsSIDLimit;
 
-    @HotSpotVMConstant(name = "JVM_ACC_HAS_FINALIZER") @Stable public int klassHasFinalizerFlag;
-
-    // Modifier.SYNTHETIC is not public so we get it via vmStructs.
-    @HotSpotVMConstant(name = "JVM_ACC_SYNTHETIC") @Stable public int syntheticFlag;
-
-    /**
-     * @see HotSpotResolvedObjectTypeImpl#createField
-     */
-    @HotSpotVMConstant(name = "JVM_RECOGNIZED_FIELD_MODIFIERS") @Stable public int recognizedFieldModifiers;
-
     /**
      * Bit pattern that represents a non-oop. Neither the high bits nor the low bits of this value
      * are allowed to look like (respectively) the high or low bits of a real oop.
      */
-    @HotSpotVMField(name = "Universe::_non_oop_bits", type = "intptr_t", get = HotSpotVMField.Type.VALUE) @Stable public long nonOopBits;
+    @HotSpotVMField(name = "CompilerToVM::Data::Universe_non_oop_bits", type = "void*", get = HotSpotVMField.Type.VALUE) @Stable public long nonOopBits;
 
     @HotSpotVMField(name = "StubRoutines::_verify_oop_count", type = "jint", get = HotSpotVMField.Type.ADDRESS) @Stable public long verifyOopCounterAddress;
-    @HotSpotVMField(name = "Universe::_verify_oop_mask", type = "uintptr_t", get = HotSpotVMField.Type.VALUE) @Stable public long verifyOopMask;
-    @HotSpotVMField(name = "Universe::_verify_oop_bits", type = "uintptr_t", get = HotSpotVMField.Type.VALUE) @Stable public long verifyOopBits;
-    @HotSpotVMField(name = "Universe::_base_vtable_size", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int universeBaseVtableSize;
+    @HotSpotVMField(name = "CompilerToVM::Data::Universe_verify_oop_mask", type = "uintptr_t", get = HotSpotVMField.Type.VALUE) @Stable public long verifyOopMask;
+    @HotSpotVMField(name = "CompilerToVM::Data::Universe_verify_oop_bits", type = "uintptr_t", get = HotSpotVMField.Type.VALUE) @Stable public long verifyOopBits;
+    @HotSpotVMField(name = "CompilerToVM::Data::Universe_base_vtable_size", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int universeBaseVtableSize;
 
     public final int baseVtableLength() {
         return universeBaseVtableSize / vtableEntrySize;
     }
 
-    @HotSpotVMField(name = "CollectedHeap::_barrier_set", type = "BarrierSet*", get = HotSpotVMField.Type.OFFSET) @Stable public int collectedHeapBarrierSetOffset;
-
     @HotSpotVMField(name = "HeapRegion::LogOfHRGrainBytes", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int logOfHRGrainBytes;
 
-    @HotSpotVMField(name = "BarrierSet::_fake_rtti", type = "BarrierSet::FakeRtti", get = HotSpotVMField.Type.OFFSET) @Stable private int barrierSetFakeRttiOffset;
-    @HotSpotVMConstant(name = "BarrierSet::CardTableModRef") @Stable public int barrierSetCardTableModRef;
-    @HotSpotVMConstant(name = "BarrierSet::CardTableForRS") @Stable public int barrierSetCardTableForRS;
-    @HotSpotVMConstant(name = "BarrierSet::CardTableExtension") @Stable public int barrierSetCardTableExtension;
-    @HotSpotVMConstant(name = "BarrierSet::G1SATBCT") @Stable public int barrierSetG1SATBCT;
-    @HotSpotVMConstant(name = "BarrierSet::G1SATBCTLogging") @Stable public int barrierSetG1SATBCTLogging;
-    @HotSpotVMConstant(name = "BarrierSet::ModRef") @Stable public int barrierSetModRef;
-
-    @HotSpotVMField(name = "BarrierSet::FakeRtti::_concrete_tag", type = "BarrierSet::Name", get = HotSpotVMField.Type.OFFSET) @Stable private int fakeRttiConcreteTagOffset;
-
-    @HotSpotVMField(name = "CardTableModRefBS::byte_map_base", type = "jbyte*", get = HotSpotVMField.Type.OFFSET) @Stable private int cardTableModRefBSByteMapBaseOffset;
-    @HotSpotVMConstant(name = "CardTableModRefBS::card_shift") @Stable public int cardTableModRefBSCardShift;
-
     @HotSpotVMConstant(name = "CardTableModRefBS::dirty_card") @Stable public byte dirtyCardValue;
     @HotSpotVMConstant(name = "G1SATBCardTableModRefBS::g1_young_gen") @Stable public byte g1YoungCardValue;
 
-    private final long cardtableStartAddress;
-    private final int cardtableShift;
+    @HotSpotVMField(name = "CompilerToVM::Data::cardtable_start_address", type = "jbyte*", get = HotSpotVMField.Type.VALUE) @Stable private long cardtableStartAddress;
+    @HotSpotVMField(name = "CompilerToVM::Data::cardtable_shift", type = "int", get = HotSpotVMField.Type.VALUE) @Stable private int cardtableShift;
 
     public long cardtableStartAddress() {
-        if (cardtableStartAddress == -1) {
-            throw JVMCIError.shouldNotReachHere();
-        }
         return cardtableStartAddress;
     }
 
     public int cardtableShift() {
-        if (cardtableShift == -1) {
-            throw JVMCIError.shouldNotReachHere();
-        }
         return cardtableShift;
     }
 
@@ -1421,34 +1389,12 @@
     @HotSpotVMField(name = "java_lang_Class::_klass_offset", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int klassOffset;
     @HotSpotVMField(name = "java_lang_Class::_array_klass_offset", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int arrayKlassOffset;
 
-    @HotSpotVMField(name = "Method::_method_counters", type = "MethodCounters*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodCountersOffset;
-    @HotSpotVMField(name = "Method::_method_data", type = "MethodData*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOffset;
-    @HotSpotVMField(name = "Method::_from_compiled_entry", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable public int methodCompiledEntryOffset;
-    @HotSpotVMField(name = "Method::_code", type = "nmethod*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodCodeOffset;
-
-    @HotSpotVMField(name = "MethodCounters::_invocation_counter", type = "InvocationCounter", get = HotSpotVMField.Type.OFFSET) @Stable public int invocationCounterOffset;
-    @HotSpotVMField(name = "MethodCounters::_backedge_counter", type = "InvocationCounter", get = HotSpotVMField.Type.OFFSET) @Stable public int backedgeCounterOffset;
-    @HotSpotVMConstant(name = "InvocationCounter::count_increment") @Stable public int invocationCounterIncrement;
-    @HotSpotVMConstant(name = "InvocationCounter::count_shift") @Stable public int invocationCounterShift;
-
-    @HotSpotVMField(name = "MethodData::_size", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataSize;
-    @HotSpotVMField(name = "MethodData::_data_size", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataDataSize;
-    @HotSpotVMField(name = "MethodData::_data[0]", type = "intptr_t", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOopDataOffset;
-    @HotSpotVMField(name = "MethodData::_trap_hist._array[0]", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOopTrapHistoryOffset;
-    @HotSpotVMField(name = "MethodData::_jvmci_ir_size", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataIRSizeOffset;
-
-    @HotSpotVMField(name = "nmethod::_verified_entry_point", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable public int nmethodEntryOffset;
-    @HotSpotVMField(name = "nmethod::_comp_level", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int nmethodCompLevelOffset;
-
-    @HotSpotVMConstant(name = "CompLevel_full_optimization") @Stable public int compilationLevelFullOptimization;
-
     @HotSpotVMType(name = "BasicLock", get = HotSpotVMType.Type.SIZE) @Stable public int basicLockSize;
     @HotSpotVMField(name = "BasicLock::_displaced_header", type = "markOop", get = HotSpotVMField.Type.OFFSET) @Stable public int basicLockDisplacedHeaderOffset;
 
     @HotSpotVMField(name = "Thread::_allocated_bytes", type = "jlong", get = HotSpotVMField.Type.OFFSET) @Stable public int threadAllocatedBytesOffset;
 
     @HotSpotVMFlag(name = "TLABWasteIncrement") @Stable public int tlabRefillWasteIncrement;
-    @HotSpotVMManual(name = "ThreadLocalAllocBuffer::alignment_reserve()") @Stable public int tlabAlignmentReserve;
 
     @HotSpotVMField(name = "ThreadLocalAllocBuffer::_start", type = "HeapWord*", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferStartOffset;
     @HotSpotVMField(name = "ThreadLocalAllocBuffer::_end", type = "HeapWord*", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferEndOffset;
@@ -1496,22 +1442,14 @@
         return threadTlabOffset + threadLocalAllocBufferPfTopOffset;
     }
 
-    /**
-     * See: {@code ThreadLocalAllocBuffer::end_reserve()}.
-     */
-    public final int threadLocalAllocBufferEndReserve() {
-        final int typeSizeInBytes = roundUp(arrayOopDescLengthOffset() + Integer.BYTES, heapWordSize);
-        // T_INT arrays need not be 8 byte aligned.
-        final int reserveSize = typeSizeInBytes / heapWordSize;
-        return Integer.max(reserveSize, abstractVmVersionReserveForAllocationPrefetch);
-    }
+    @HotSpotVMField(name = "CompilerToVM::Data::ThreadLocalAllocBuffer_alignment_reserve", type = "size_t", get = HotSpotVMField.Type.VALUE) @Stable public int tlabAlignmentReserve;
 
     @HotSpotVMFlag(name = "TLABStats") @Stable public boolean tlabStats;
 
     // FIXME This is only temporary until the GC code is changed.
-    @HotSpotVMField(name = "CompilerToVM::_supports_inline_contig_alloc", type = "bool", get = HotSpotVMField.Type.VALUE) @Stable public boolean inlineContiguousAllocationSupported;
-    @HotSpotVMField(name = "CompilerToVM::_heap_end_addr", type = "HeapWord**", get = HotSpotVMField.Type.VALUE) @Stable public long heapEndAddress;
-    @HotSpotVMField(name = "CompilerToVM::_heap_top_addr", type = "HeapWord**", get = HotSpotVMField.Type.VALUE) @Stable public long heapTopAddress;
+    @HotSpotVMField(name = "CompilerToVM::Data::_supports_inline_contig_alloc", type = "bool", get = HotSpotVMField.Type.VALUE) @Stable public boolean inlineContiguousAllocationSupported;
+    @HotSpotVMField(name = "CompilerToVM::Data::_heap_end_addr", type = "HeapWord**", get = HotSpotVMField.Type.VALUE) @Stable public long heapEndAddress;
+    @HotSpotVMField(name = "CompilerToVM::Data::_heap_top_addr", type = "HeapWord**", get = HotSpotVMField.Type.VALUE) @Stable public long heapTopAddress;
 
     /**
      * The DataLayout header size is the same as the cell size.
@@ -1542,19 +1480,11 @@
     @HotSpotVMFlag(name = "TypeProfileWidth") @Stable public int typeProfileWidth;
     @HotSpotVMFlag(name = "MethodProfileWidth") @Stable public int methodProfileWidth;
 
-    @HotSpotVMField(name = "CodeBlob::_code_offset", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable private int codeBlobCodeOffsetOffset;
-    @HotSpotVMField(name = "DeoptimizationBlob::_unpack_offset", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable private int deoptimizationBlobUnpackOffsetOffset;
-    @HotSpotVMField(name = "DeoptimizationBlob::_uncommon_trap_offset", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable private int deoptimizationBlobUncommonTrapOffsetOffset;
+    @HotSpotVMField(name = "CompilerToVM::Data::SharedRuntime_ic_miss_stub", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long inlineCacheMissStub;
+    @HotSpotVMField(name = "CompilerToVM::Data::SharedRuntime_handle_wrong_method_stub", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long handleWrongMethodStub;
 
-    @HotSpotVMField(name = "SharedRuntime::_ic_miss_blob", type = "RuntimeStub*", get = HotSpotVMField.Type.VALUE) @Stable private long inlineCacheMissBlob;
-    @HotSpotVMField(name = "SharedRuntime::_wrong_method_blob", type = "RuntimeStub*", get = HotSpotVMField.Type.VALUE) @Stable private long wrongMethodBlob;
-    @HotSpotVMField(name = "SharedRuntime::_deopt_blob", type = "DeoptimizationBlob*", get = HotSpotVMField.Type.VALUE) @Stable private long deoptBlob;
-
-    @HotSpotVMManual(name = "SharedRuntime::get_ic_miss_stub()") public final long inlineCacheMissStub;
-    @HotSpotVMManual(name = "SharedRuntime::get_handle_wrong_method_stub()") public final long handleWrongMethodStub;
-
-    @HotSpotVMManual(name = "SharedRuntime::deopt_blob()->unpack()") public final long handleDeoptStub;
-    @HotSpotVMManual(name = "SharedRuntime::deopt_blob()->uncommon_trap()") public final long uncommonTrapStub;
+    @HotSpotVMField(name = "CompilerToVM::Data::SharedRuntime_deopt_blob_unpack", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long handleDeoptStub;
+    @HotSpotVMField(name = "CompilerToVM::Data::SharedRuntime_deopt_blob_uncommon_trap", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long uncommonTrapStub;
 
     @HotSpotVMField(name = "CodeCache::_low_bound", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long codeCacheLowBound;
     @HotSpotVMField(name = "CodeCache::_high_bound", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long codeCacheHighBound;
@@ -1717,9 +1647,6 @@
         return "unknown";
     }
 
-    @HotSpotVMConstant(name = "CompilerToVM::KLASS_TAG") @Stable public int compilerToVMKlassTag;
-    @HotSpotVMConstant(name = "CompilerToVM::SYMBOL_TAG") @Stable public int compilerToVMSymbolTag;
-
     // Checkstyle: stop
     @HotSpotVMConstant(name = "CodeInstaller::VERIFIED_ENTRY") @Stable public int MARKID_VERIFIED_ENTRY;
     @HotSpotVMConstant(name = "CodeInstaller::UNVERIFIED_ENTRY") @Stable public int MARKID_UNVERIFIED_ENTRY;
@@ -1756,7 +1683,6 @@
     @HotSpotVMConstant(name = "ArrayData::array_len_off_set") @Stable public int arrayDataArrayLenOffset;
     @HotSpotVMConstant(name = "ArrayData::array_start_off_set") @Stable public int arrayDataArrayStartOffset;
     @HotSpotVMConstant(name = "MultiBranchData::per_case_cell_count") @Stable public int multiBranchDataPerCaseCellCount;
-
     // Checkstyle: resume
 
     private boolean check() {
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspotvmconfig/src/jdk/vm/ci/hotspotvmconfig/HotSpotVMManual.java	Tue Dec 08 14:26:17 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.vm.ci.hotspotvmconfig;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotates a field in HotSpotVMConfig which is not read from the VM but is calculated manually.
- */
-@Target(ElementType.FIELD)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface HotSpotVMManual {
-
-    /**
-     * Returns the name associated with that field.
-     *
-     * @return name associated with field
-     */
-    String name();
-
-}
--- a/hotspot/src/share/vm/classfile/javaClasses.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/classfile/javaClasses.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -240,6 +240,7 @@
 
 class java_lang_Class : AllStatic {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 
  private:
   // The fake offsets are added by the class loader when java.lang.Class is loaded
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -1328,6 +1328,7 @@
 class vmSymbols: AllStatic {
   friend class vmIntrinsics;
   friend class VMStructs;
+  friend class JVMCIVMStructs;
  public:
   // enum for figuring positions and size of array holding Symbol*s
   enum SID {
--- a/hotspot/src/share/vm/code/codeBlob.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/code/codeBlob.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -64,6 +64,7 @@
 class CodeBlob VALUE_OBJ_CLASS_SPEC {
 
   friend class VMStructs;
+  friend class JVMCIVMStructs;
   friend class CodeCacheDumper;
 
  private:
@@ -374,6 +375,7 @@
 
 class DeoptimizationBlob: public SingletonBlob {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
  private:
   int _unpack_offset;
   int _unpack_with_exception;
--- a/hotspot/src/share/vm/code/codeCache.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/code/codeCache.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -76,6 +76,7 @@
 
 class CodeCache : AllStatic {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
   friend class NMethodIterator;
   friend class WhiteBox;
   friend class CodeCacheLoader;
--- a/hotspot/src/share/vm/code/nmethod.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/code/nmethod.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -113,6 +113,7 @@
 
 class nmethod : public CodeBlob {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
   friend class NMethodSweeper;
   friend class CodeCache;  // scavengable oops
  private:
--- a/hotspot/src/share/vm/compiler/compileTask.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/compiler/compileTask.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -38,6 +38,7 @@
 
 class CompileTask : public CHeapObj<mtCompiler> {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 
  private:
   static CompileTask* _task_free_list;
--- a/hotspot/src/share/vm/gc/g1/vmStructs_g1.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/gc/g1/vmStructs_g1.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -70,27 +70,6 @@
 
 
 #define VM_INT_CONSTANTS_G1(declare_constant, declare_constant_with_value)    \
-                                                                              \
-  JVMCI_ONLY(                                                                 \
-    declare_constant_with_value(                                              \
-      "dirtyCardQueueBufferOffset",                                           \
-      in_bytes(DirtyCardQueue::byte_offset_of_buf()))                         \
-    declare_constant_with_value(                                              \
-      "dirtyCardQueueIndexOffset",                                            \
-      in_bytes(DirtyCardQueue::byte_offset_of_index()))                       \
-    ) /* JVMCI_ONLY */                                                        \
-                                                                              \
-  JVMCI_ONLY(                                                                 \
-    declare_constant_with_value(                                              \
-      "satbMarkQueueBufferOffset",                                            \
-      in_bytes(SATBMarkQueue::byte_offset_of_buf()))                          \
-    declare_constant_with_value(                                              \
-      "satbMarkQueueIndexOffset",                                             \
-      in_bytes(SATBMarkQueue::byte_offset_of_index()))                        \
-    declare_constant_with_value(                                              \
-      "satbMarkQueueActiveOffset",                                            \
-      in_bytes(SATBMarkQueue::byte_offset_of_active()))                       \
-    ) /* JVMCI_ONLY */                                                        \
 
 
 #define VM_TYPES_G1(declare_type, declare_toplevel_type)                      \
--- a/hotspot/src/share/vm/gc/shared/collectedHeap.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/gc/shared/collectedHeap.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -81,6 +81,7 @@
 //
 class CollectedHeap : public CHeapObj<mtInternal> {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
   friend class IsGCActiveMark; // Block structured external access to _is_gc_active
 
  private:
--- a/hotspot/src/share/vm/gc/shared/threadLocalAllocBuffer.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/gc/shared/threadLocalAllocBuffer.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -39,6 +39,7 @@
 //            used to make it available for such multiplexing.
 class ThreadLocalAllocBuffer: public CHeapObj<mtThread> {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 private:
   HeapWord* _start;                              // address of TLAB
   HeapWord* _top;                                // address after last allocation
--- a/hotspot/src/share/vm/jvmci/jvmciCodeInstaller.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/jvmci/jvmciCodeInstaller.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -89,7 +89,7 @@
  * This class handles the conversion from a InstalledCode to a CodeBlob or an nmethod.
  */
 class CodeInstaller : public StackObj {
-  friend class VMStructs;
+  friend class JVMCIVMStructs;
 private:
   enum MarkId {
     VERIFIED_ENTRY             = 1,
--- a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp	Mon Dec 14 17:02:02 2015 -1000
@@ -43,6 +43,7 @@
 #include "jvmci/jvmciEnv.hpp"
 #include "jvmci/jvmciJavaClasses.hpp"
 #include "jvmci/jvmciCodeInstaller.hpp"
+#include "jvmci/vmStructs_jvmci.hpp"
 #include "gc/g1/heapRegion.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/deoptimization.hpp"
@@ -85,88 +86,160 @@
 }
 
 extern "C" {
-extern VMStructEntry* gHotSpotVMStructs;
-extern uint64_t gHotSpotVMStructEntryTypeNameOffset;
-extern uint64_t gHotSpotVMStructEntryFieldNameOffset;
-extern uint64_t gHotSpotVMStructEntryTypeStringOffset;
-extern uint64_t gHotSpotVMStructEntryIsStaticOffset;
-extern uint64_t gHotSpotVMStructEntryOffsetOffset;
-extern uint64_t gHotSpotVMStructEntryAddressOffset;
-extern uint64_t gHotSpotVMStructEntryArrayStride;
+extern VMStructEntry* jvmciHotSpotVMStructs;
+extern uint64_t jvmciHotSpotVMStructEntryTypeNameOffset;
+extern uint64_t jvmciHotSpotVMStructEntryFieldNameOffset;
+extern uint64_t jvmciHotSpotVMStructEntryTypeStringOffset;
+extern uint64_t jvmciHotSpotVMStructEntryIsStaticOffset;
+extern uint64_t jvmciHotSpotVMStructEntryOffsetOffset;
+extern uint64_t jvmciHotSpotVMStructEntryAddressOffset;
+extern uint64_t jvmciHotSpotVMStructEntryArrayStride;
 
-extern VMTypeEntry* gHotSpotVMTypes;
-extern uint64_t gHotSpotVMTypeEntryTypeNameOffset;
-extern uint64_t gHotSpotVMTypeEntrySuperclassNameOffset;
-extern uint64_t gHotSpotVMTypeEntryIsOopTypeOffset;
-extern uint64_t gHotSpotVMTypeEntryIsIntegerTypeOffset;
-extern uint64_t gHotSpotVMTypeEntryIsUnsignedOffset;
-extern uint64_t gHotSpotVMTypeEntrySizeOffset;
-extern uint64_t gHotSpotVMTypeEntryArrayStride;
+extern VMTypeEntry* jvmciHotSpotVMTypes;
+extern uint64_t jvmciHotSpotVMTypeEntryTypeNameOffset;
+extern uint64_t jvmciHotSpotVMTypeEntrySuperclassNameOffset;
+extern uint64_t jvmciHotSpotVMTypeEntryIsOopTypeOffset;
+extern uint64_t jvmciHotSpotVMTypeEntryIsIntegerTypeOffset;
+extern uint64_t jvmciHotSpotVMTypeEntryIsUnsignedOffset;
+extern uint64_t jvmciHotSpotVMTypeEntrySizeOffset;
+extern uint64_t jvmciHotSpotVMTypeEntryArrayStride;
 
-extern VMIntConstantEntry* gHotSpotVMIntConstants;
-extern uint64_t gHotSpotVMIntConstantEntryNameOffset;
-extern uint64_t gHotSpotVMIntConstantEntryValueOffset;
-extern uint64_t gHotSpotVMIntConstantEntryArrayStride;
+extern VMIntConstantEntry* jvmciHotSpotVMIntConstants;
+extern uint64_t jvmciHotSpotVMIntConstantEntryNameOffset;
+extern uint64_t jvmciHotSpotVMIntConstantEntryValueOffset;
+extern uint64_t jvmciHotSpotVMIntConstantEntryArrayStride;
 
-extern VMLongConstantEntry* gHotSpotVMLongConstants;
-extern uint64_t gHotSpotVMLongConstantEntryNameOffset;
-extern uint64_t gHotSpotVMLongConstantEntryValueOffset;
-extern uint64_t gHotSpotVMLongConstantEntryArrayStride;
+extern VMLongConstantEntry* jvmciHotSpotVMLongConstants;
+extern uint64_t jvmciHotSpotVMLongConstantEntryNameOffset;
+extern uint64_t jvmciHotSpotVMLongConstantEntryValueOffset;
+extern uint64_t jvmciHotSpotVMLongConstantEntryArrayStride;
 
-extern VMAddressEntry* gHotSpotVMAddresses;
-extern uint64_t gHotSpotVMAddressEntryNameOffset;
-extern uint64_t gHotSpotVMAddressEntryValueOffset;
-extern uint64_t gHotSpotVMAddressEntryArrayStride;
+extern VMAddressEntry* jvmciHotSpotVMAddresses;
+extern uint64_t jvmciHotSpotVMAddressEntryNameOffset;
+extern uint64_t jvmciHotSpotVMAddressEntryValueOffset;
+extern uint64_t jvmciHotSpotVMAddressEntryArrayStride;
 }
 
-// FIXME This is only temporary until the GC code is changed.
-bool       CompilerToVM::_supports_inline_contig_alloc;
-HeapWord** CompilerToVM::_heap_end_addr;
-HeapWord** CompilerToVM::_heap_top_addr;
+int CompilerToVM::Data::InstanceKlass_vtable_start_offset;
+int CompilerToVM::Data::InstanceKlass_vtable_length_offset;
+
+int CompilerToVM::Data::Method_extra_stack_entries;
+
+address CompilerToVM::Data::SharedRuntime_ic_miss_stub;
+address CompilerToVM::Data::SharedRuntime_handle_wrong_method_stub;
+address CompilerToVM::Data::SharedRuntime_deopt_blob_unpack;
+address CompilerToVM::Data::SharedRuntime_deopt_blob_uncommon_trap;
+
+size_t CompilerToVM::Data::ThreadLocalAllocBuffer_alignment_reserve;
+
+CollectedHeap* CompilerToVM::Data::Universe_collectedHeap;
+int CompilerToVM::Data::Universe_base_vtable_size;
+address CompilerToVM::Data::Universe_narrow_oop_base;
+int CompilerToVM::Data::Universe_narrow_oop_shift;
+address CompilerToVM::Data::Universe_narrow_klass_base;
+int CompilerToVM::Data::Universe_narrow_klass_shift;
+void* CompilerToVM::Data::Universe_non_oop_bits;
+uintptr_t CompilerToVM::Data::Universe_verify_oop_mask;
+uintptr_t CompilerToVM::Data::Universe_verify_oop_bits;
+
+bool       CompilerToVM::Data::_supports_inline_contig_alloc;
+HeapWord** CompilerToVM::Data::_heap_end_addr;
+HeapWord** CompilerToVM::Data::_heap_top_addr;
+
+jbyte* CompilerToVM::Data::cardtable_start_address;
+int CompilerToVM::Data::cardtable_shift;
+
+void CompilerToVM::Data::initialize() {
+  InstanceKlass_vtable_start_offset = InstanceKlass::vtable_start_offset();
+  InstanceKlass_vtable_length_offset = InstanceKlass::vtable_length_offset() * HeapWordSize;
+
+  Method_extra_stack_entries = Method::extra_stack_entries();
+
+  SharedRuntime_ic_miss_stub = SharedRuntime::get_ic_miss_stub();
+  SharedRuntime_handle_wrong_method_stub = SharedRuntime::get_handle_wrong_method_stub();
+  SharedRuntime_deopt_blob_unpack = SharedRuntime::deopt_blob()->unpack();
+  SharedRuntime_deopt_blob_uncommon_trap = SharedRuntime::deopt_blob()->uncommon_trap();
+
+  ThreadLocalAllocBuffer_alignment_reserve = ThreadLocalAllocBuffer::alignment_reserve();
+
+  Universe_collectedHeap = Universe::heap();
+  Universe_base_vtable_size = Universe::base_vtable_size();
+  Universe_narrow_oop_base = Universe::narrow_oop_base();
+  Universe_narrow_oop_shift = Universe::narrow_oop_shift();
+  Universe_narrow_klass_base = Universe::narrow_klass_base();
+  Universe_narrow_klass_shift = Universe::narrow_klass_shift();
+  Universe_non_oop_bits = Universe::non_oop_word();
+  Universe_verify_oop_mask = Universe::verify_oop_mask();
+  Universe_verify_oop_bits = Universe::verify_oop_bits();
+
+  _supports_inline_contig_alloc = Universe::heap()->supports_inline_contig_alloc();
+  _heap_end_addr = _supports_inline_contig_alloc ? Universe::heap()->end_addr() : (HeapWord**) -1;
+  _heap_top_addr = _supports_inline_contig_alloc ? Universe::heap()->top_addr() : (HeapWord**) -1;
+
+  BarrierSet* bs = Universe::heap()->barrier_set();
+  switch (bs->kind()) {
+  case BarrierSet::CardTableModRef:
+  case BarrierSet::CardTableForRS:
+  case BarrierSet::CardTableExtension:
+  case BarrierSet::G1SATBCT:
+  case BarrierSet::G1SATBCTLogging: {
+    jbyte* base = barrier_set_cast<CardTableModRefBS>(bs)->byte_map_base;
+    assert(base != 0, "unexpected byte_map_base");
+    cardtable_start_address = base;
+    cardtable_shift = CardTableModRefBS::card_shift;
+    break;
+  }
+  case BarrierSet::ModRef:
+    cardtable_start_address = 0;
+    cardtable_shift = 0;
+    // No post barriers
+    break;
+  default:
+    ShouldNotReachHere();
+    break;
+  }
+}
 
 /**
- * We put all gHotSpotVM values in an array so we can read them easily from Java.
+ * We put all jvmciHotSpotVM values in an array so we can read them easily from Java.
  */
 static uintptr_t ciHotSpotVMData[28];
 
 C2V_VMENTRY(jlong, initializeConfiguration, (JNIEnv *env, jobject))
-  ciHotSpotVMData[0] = (uintptr_t) gHotSpotVMStructs;
-  ciHotSpotVMData[1] = gHotSpotVMStructEntryTypeNameOffset;
-  ciHotSpotVMData[2] = gHotSpotVMStructEntryFieldNameOffset;
-  ciHotSpotVMData[3] = gHotSpotVMStructEntryTypeStringOffset;
-  ciHotSpotVMData[4] = gHotSpotVMStructEntryIsStaticOffset;
-  ciHotSpotVMData[5] = gHotSpotVMStructEntryOffsetOffset;
-  ciHotSpotVMData[6] = gHotSpotVMStructEntryAddressOffset;
-  ciHotSpotVMData[7] = gHotSpotVMStructEntryArrayStride;
-
-  ciHotSpotVMData[8] = (uintptr_t) gHotSpotVMTypes;
-  ciHotSpotVMData[9] = gHotSpotVMTypeEntryTypeNameOffset;
-  ciHotSpotVMData[10] = gHotSpotVMTypeEntrySuperclassNameOffset;
-  ciHotSpotVMData[11] = gHotSpotVMTypeEntryIsOopTypeOffset;
-  ciHotSpotVMData[12] = gHotSpotVMTypeEntryIsIntegerTypeOffset;
-  ciHotSpotVMData[13] = gHotSpotVMTypeEntryIsUnsignedOffset;
-  ciHotSpotVMData[14] = gHotSpotVMTypeEntrySizeOffset;
-  ciHotSpotVMData[15] = gHotSpotVMTypeEntryArrayStride;
+  ciHotSpotVMData[0] = (uintptr_t) jvmciHotSpotVMStructs;
+  ciHotSpotVMData[1] = jvmciHotSpotVMStructEntryTypeNameOffset;
+  ciHotSpotVMData[2] = jvmciHotSpotVMStructEntryFieldNameOffset;
+  ciHotSpotVMData[3] = jvmciHotSpotVMStructEntryTypeStringOffset;
+  ciHotSpotVMData[4] = jvmciHotSpotVMStructEntryIsStaticOffset;
+  ciHotSpotVMData[5] = jvmciHotSpotVMStructEntryOffsetOffset;
+  ciHotSpotVMData[6] = jvmciHotSpotVMStructEntryAddressOffset;
+  ciHotSpotVMData[7] = jvmciHotSpotVMStructEntryArrayStride;
 
-  ciHotSpotVMData[16] = (uintptr_t) gHotSpotVMIntConstants;
-  ciHotSpotVMData[17] = gHotSpotVMIntConstantEntryNameOffset;
-  ciHotSpotVMData[18] = gHotSpotVMIntConstantEntryValueOffset;
-  ciHotSpotVMData[19] = gHotSpotVMIntConstantEntryArrayStride;
-
-  ciHotSpotVMData[20] = (uintptr_t) gHotSpotVMLongConstants;
-  ciHotSpotVMData[21] = gHotSpotVMLongConstantEntryNameOffset;
-  ciHotSpotVMData[22] = gHotSpotVMLongConstantEntryValueOffset;
-  ciHotSpotVMData[23] = gHotSpotVMLongConstantEntryArrayStride;
+  ciHotSpotVMData[8] = (uintptr_t) jvmciHotSpotVMTypes;
+  ciHotSpotVMData[9] = jvmciHotSpotVMTypeEntryTypeNameOffset;
+  ciHotSpotVMData[10] = jvmciHotSpotVMTypeEntrySuperclassNameOffset;
+  ciHotSpotVMData[11] = jvmciHotSpotVMTypeEntryIsOopTypeOffset;
+  ciHotSpotVMData[12] = jvmciHotSpotVMTypeEntryIsIntegerTypeOffset;
+  ciHotSpotVMData[13] = jvmciHotSpotVMTypeEntryIsUnsignedOffset;
+  ciHotSpotVMData[14] = jvmciHotSpotVMTypeEntrySizeOffset;
+  ciHotSpotVMData[15] = jvmciHotSpotVMTypeEntryArrayStride;
 
-  ciHotSpotVMData[24] = (uintptr_t) gHotSpotVMAddresses;
-  ciHotSpotVMData[25] = gHotSpotVMAddressEntryNameOffset;
-  ciHotSpotVMData[26] = gHotSpotVMAddressEntryValueOffset;
-  ciHotSpotVMData[27] = gHotSpotVMAddressEntryArrayStride;
+  ciHotSpotVMData[16] = (uintptr_t) jvmciHotSpotVMIntConstants;
+  ciHotSpotVMData[17] = jvmciHotSpotVMIntConstantEntryNameOffset;
+  ciHotSpotVMData[18] = jvmciHotSpotVMIntConstantEntryValueOffset;
+  ciHotSpotVMData[19] = jvmciHotSpotVMIntConstantEntryArrayStride;
 
-  // FIXME This is only temporary until the GC code is changed.
-  CompilerToVM::_supports_inline_contig_alloc = Universe::heap()->supports_inline_contig_alloc();
-  CompilerToVM::_heap_end_addr = CompilerToVM::_supports_inline_contig_alloc ? Universe::heap()->end_addr() : (HeapWord**) -1;
-  CompilerToVM::_heap_top_addr = CompilerToVM::_supports_inline_contig_alloc ? Universe::heap()->top_addr() : (HeapWord**) -1;
+  ciHotSpotVMData[20] = (uintptr_t) jvmciHotSpotVMLongConstants;
+  ciHotSpotVMData[21] = jvmciHotSpotVMLongConstantEntryNameOffset;
+  ciHotSpotVMData[22] = jvmciHotSpotVMLongConstantEntryValueOffset;
+  ciHotSpotVMData[23] = jvmciHotSpotVMLongConstantEntryArrayStride;
+
+  ciHotSpotVMData[24] = (uintptr_t) jvmciHotSpotVMAddresses;
+  ciHotSpotVMData[25] = jvmciHotSpotVMAddressEntryNameOffset;
+  ciHotSpotVMData[26] = jvmciHotSpotVMAddressEntryValueOffset;
+  ciHotSpotVMData[27] = jvmciHotSpotVMAddressEntryArrayStride;
+
+  CompilerToVM::Data::initialize();
 
   return (jlong) (address) &ciHotSpotVMData;
 C2V_END
--- a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -29,28 +29,45 @@
 #include "jvmci/jvmciJavaClasses.hpp"
 
 class CompilerToVM {
-public:
-  /**
-   * Tag bits used by lookupKlassInPool to distinguish the types in Java.
-   */
-  enum Tags {
-    KLASS_TAG = 0x0,
-    SYMBOL_TAG = 0x1
+ public:
+  class Data {
+    friend class JVMCIVMStructs;
+
+   private:
+    static int InstanceKlass_vtable_start_offset;
+    static int InstanceKlass_vtable_length_offset;
+
+    static int Method_extra_stack_entries;
+
+    static address SharedRuntime_ic_miss_stub;
+    static address SharedRuntime_handle_wrong_method_stub;
+    static address SharedRuntime_deopt_blob_unpack;
+    static address SharedRuntime_deopt_blob_uncommon_trap;
+
+    static size_t ThreadLocalAllocBuffer_alignment_reserve;
+
+    static CollectedHeap* Universe_collectedHeap;
+    static int Universe_base_vtable_size;
+    static address Universe_narrow_oop_base;
+    static int Universe_narrow_oop_shift;
+    static address Universe_narrow_klass_base;
+    static int Universe_narrow_klass_shift;
+    static uintptr_t Universe_verify_oop_mask;
+    static uintptr_t Universe_verify_oop_bits;
+    static void* Universe_non_oop_bits;
+
+    static bool _supports_inline_contig_alloc;
+    static HeapWord** _heap_end_addr;
+    static HeapWord** _heap_top_addr;
+
+    static jbyte* cardtable_start_address;
+    static int cardtable_shift;
+
+   public:
+    static void initialize();
   };
 
-  // FIXME This is only temporary until the GC code is changed.
-  static bool _supports_inline_contig_alloc;
-  static HeapWord** _heap_end_addr;
-  static HeapWord** _heap_top_addr;
-
-  static intptr_t tag_pointer(Klass* klass) {
-    return ((intptr_t) klass) | KLASS_TAG;
-  }
-
-  static intptr_t tag_pointer(Symbol* symbol) {
-    return ((intptr_t) symbol) | SYMBOL_TAG;
-  }
-
+ public:
   static JNINativeMethod methods[];
   static int methods_count();
 
--- a/hotspot/src/share/vm/jvmci/jvmciEnv.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/jvmci/jvmciEnv.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -53,6 +53,7 @@
 class JVMCIEnv : StackObj {
   CI_PACKAGE_ACCESS_TO
 
+  friend class JVMCIVMStructs;
   friend class CompileBroker;
   friend class Dependencies;  // for get_object, during logging
 
--- a/hotspot/src/share/vm/jvmci/jvmciRuntime.cpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/jvmci/jvmciRuntime.cpp	Mon Dec 14 17:02:02 2015 -1000
@@ -813,10 +813,6 @@
 
   {
     ThreadToNativeFromVM trans(thread);
-
-    // Ensure _non_oop_bits is initialized
-    Universe::non_oop_word();
-
     env->RegisterNatives(c2vmClass, CompilerToVM::methods, CompilerToVM::methods_count());
   }
 JVM_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp	Mon Dec 14 17:02:02 2015 -1000
@@ -0,0 +1,849 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "code/codeBlob.hpp"
+#include "compiler/abstractCompiler.hpp"
+#include "compiler/compileBroker.hpp"
+#include "jvmci/jvmciCodeInstaller.hpp"
+#include "jvmci/jvmciCompilerToVM.hpp"
+#include "jvmci/jvmciEnv.hpp"
+#include "jvmci/jvmciRuntime.hpp"
+#include "jvmci/vmStructs_jvmci.hpp"
+#include "oops/oop.hpp"
+#include "oops/objArrayKlass.hpp"
+#include "runtime/globals.hpp"
+#include "runtime/sharedRuntime.hpp"
+#include "runtime/thread.hpp"
+#include "runtime/vm_version.hpp"
+
+#if INCLUDE_ALL_GCS
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/heapRegion.hpp"
+#endif
+
+
+#define VM_STRUCTS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field) \
+  static_field(CompilerToVM::Data,             InstanceKlass_vtable_start_offset,      int)                                          \
+  static_field(CompilerToVM::Data,             InstanceKlass_vtable_length_offset,     int)                                          \
+                                                                                                                                     \
+  static_field(CompilerToVM::Data,             Method_extra_stack_entries,             int)                                          \
+                                                                                                                                     \
+  static_field(CompilerToVM::Data,             SharedRuntime_ic_miss_stub,             address)                                      \
+  static_field(CompilerToVM::Data,             SharedRuntime_handle_wrong_method_stub, address)                                      \
+  static_field(CompilerToVM::Data,             SharedRuntime_deopt_blob_unpack,        address)                                      \
+  static_field(CompilerToVM::Data,             SharedRuntime_deopt_blob_uncommon_trap, address)                                      \
+                                                                                                                                     \
+  static_field(CompilerToVM::Data,             ThreadLocalAllocBuffer_alignment_reserve, size_t)                                     \
+                                                                                                                                     \
+  static_field(CompilerToVM::Data,             Universe_collectedHeap,                 CollectedHeap*)                               \
+  static_field(CompilerToVM::Data,             Universe_base_vtable_size,              int)                                          \
+  static_field(CompilerToVM::Data,             Universe_narrow_oop_base,               address)                                      \
+  static_field(CompilerToVM::Data,             Universe_narrow_oop_shift,              int)                                          \
+  static_field(CompilerToVM::Data,             Universe_narrow_klass_base,             address)                                      \
+  static_field(CompilerToVM::Data,             Universe_narrow_klass_shift,            int)                                          \
+  static_field(CompilerToVM::Data,             Universe_non_oop_bits,                  void*)                                        \
+  static_field(CompilerToVM::Data,             Universe_verify_oop_mask,               uintptr_t)                                    \
+  static_field(CompilerToVM::Data,             Universe_verify_oop_bits,               uintptr_t)                                    \
+                                                                                                                                     \
+  static_field(CompilerToVM::Data,             _supports_inline_contig_alloc,          bool)                                         \
+  static_field(CompilerToVM::Data,             _heap_end_addr,                         HeapWord**)                                   \
+  static_field(CompilerToVM::Data,             _heap_top_addr,                         HeapWord**)                                   \
+                                                                                                                                     \
+  static_field(CompilerToVM::Data,             cardtable_start_address,                jbyte*)                                       \
+  static_field(CompilerToVM::Data,             cardtable_shift,                        int)                                          \
+                                                                                                                                     \
+  nonstatic_field(Array<int>,                  _length,                                int)                                          \
+  unchecked_nonstatic_field(Array<u1>,         _data,                                  sizeof(u1))                                   \
+  unchecked_nonstatic_field(Array<u2>,         _data,                                  sizeof(u2))                                   \
+  nonstatic_field(Array<Klass*>,               _length,                                int)                                          \
+  nonstatic_field(Array<Klass*>,               _data[0],                               Klass*)                                       \
+                                                                                                                                     \
+  volatile_nonstatic_field(BasicLock,          _displaced_header,                      markOop)                                      \
+                                                                                                                                     \
+  static_field(CodeCache,                      _low_bound,                             address)                                      \
+  static_field(CodeCache,                      _high_bound,                            address)                                      \
+                                                                                                                                     \
+  nonstatic_field(CollectedHeap,               _total_collections,                     unsigned int)                                 \
+                                                                                                                                     \
+  nonstatic_field(CompileTask,                 _num_inlined_bytecodes,                 int)                                          \
+                                                                                                                                     \
+  nonstatic_field(ConstantPool,                _tags,                                  Array<u1>*)                                   \
+  nonstatic_field(ConstantPool,                _pool_holder,                           InstanceKlass*)                               \
+  nonstatic_field(ConstantPool,                _length,                                int)                                          \
+                                                                                                                                     \
+  nonstatic_field(ConstMethod,                 _constants,                             ConstantPool*)                                \
+  nonstatic_field(ConstMethod,                 _flags,                                 u2)                                           \
+  nonstatic_field(ConstMethod,                 _code_size,                             u2)                                           \
+  nonstatic_field(ConstMethod,                 _name_index,                            u2)                                           \
+  nonstatic_field(ConstMethod,                 _signature_index,                       u2)                                           \
+  nonstatic_field(ConstMethod,                 _max_stack,                             u2)                                           \
+  nonstatic_field(ConstMethod,                 _max_locals,                            u2)                                           \
+                                                                                                                                     \
+  nonstatic_field(DataLayout,                  _header._struct._tag,                   u1)                                           \
+  nonstatic_field(DataLayout,                  _header._struct._flags,                 u1)                                           \
+  nonstatic_field(DataLayout,                  _header._struct._bci,                   u2)                                           \
+  nonstatic_field(DataLayout,                  _cells[0],                              intptr_t)                                     \
+                                                                                                                                     \
+  nonstatic_field(Deoptimization::UnrollBlock, _size_of_deoptimized_frame,             int)                                          \
+  nonstatic_field(Deoptimization::UnrollBlock, _caller_adjustment,                     int)                                          \
+  nonstatic_field(Deoptimization::UnrollBlock, _number_of_frames,                      int)                                          \
+  nonstatic_field(Deoptimization::UnrollBlock, _total_frame_sizes,                     int)                                          \
+  nonstatic_field(Deoptimization::UnrollBlock, _frame_sizes,                           intptr_t*)                                    \
+  nonstatic_field(Deoptimization::UnrollBlock, _frame_pcs,                             address*)                                     \
+  nonstatic_field(Deoptimization::UnrollBlock, _initial_info,                          intptr_t)                                     \
+  nonstatic_field(Deoptimization::UnrollBlock, _unpack_kind,                           int)                                          \
+                                                                                                                                     \
+  nonstatic_field(ExceptionTableElement,       start_pc,                                       u2)                                   \
+  nonstatic_field(ExceptionTableElement,       end_pc,                                         u2)                                   \
+  nonstatic_field(ExceptionTableElement,       handler_pc,                                     u2)                                   \
+  nonstatic_field(ExceptionTableElement,       catch_type_index,                               u2)                                   \
+                                                                                                                                     \
+  nonstatic_field(Flag,                        _type,                                          const char*)                          \
+  nonstatic_field(Flag,                        _name,                                          const char*)                          \
+  unchecked_nonstatic_field(Flag,              _addr,                                          sizeof(void*))                        \
+  nonstatic_field(Flag,                        _flags,                                         Flag::Flags)                          \
+  static_field(Flag,                           flags,                                          Flag*)                                \
+                                                                                                                                     \
+  nonstatic_field(InstanceKlass,               _fields,                                       Array<u2>*)                            \
+  nonstatic_field(InstanceKlass,               _constants,                                    ConstantPool*)                         \
+  nonstatic_field(InstanceKlass,               _source_file_name_index,                       u2)                                    \
+  nonstatic_field(InstanceKlass,               _init_state,                                   u1)                                    \
+                                                                                                                                     \
+  volatile_nonstatic_field(JavaFrameAnchor,    _last_Java_sp,                                 intptr_t*)                             \
+  volatile_nonstatic_field(JavaFrameAnchor,    _last_Java_pc,                                 address)                               \
+                                                                                                                                     \
+  nonstatic_field(JavaThread,                  _threadObj,                                    oop)                                   \
+  nonstatic_field(JavaThread,                  _anchor,                                       JavaFrameAnchor)                       \
+  nonstatic_field(JavaThread,                  _vm_result,                                    oop)                                   \
+  volatile_nonstatic_field(JavaThread,         _exception_oop,                                oop)                                   \
+  volatile_nonstatic_field(JavaThread,         _exception_pc,                                 address)                               \
+  volatile_nonstatic_field(JavaThread,         _is_method_handle_return,                      int)                                   \
+  nonstatic_field(JavaThread,                  _osthread,                                     OSThread*)                             \
+  nonstatic_field(JavaThread,                  _satb_mark_queue,                              SATBMarkQueue)                         \
+  nonstatic_field(JavaThread,                  _dirty_card_queue,                             DirtyCardQueue)                        \
+  nonstatic_field(JavaThread,                  _pending_deoptimization,                       int)                                   \
+  nonstatic_field(JavaThread,                  _pending_failed_speculation,                   oop)                                   \
+  nonstatic_field(JavaThread,                  _pending_transfer_to_interpreter,              bool)                                  \
+  nonstatic_field(JavaThread,                  _jvmci_counters,                               jlong*)                                \
+                                                                                                                                     \
+  static_field(java_lang_Class,                _klass_offset,                                 int)                                   \
+  static_field(java_lang_Class,                _array_klass_offset,                           int)                                   \
+                                                                                                                                     \
+  nonstatic_field(JVMCIEnv,                    _task,                                         CompileTask*)                          \
+  nonstatic_field(JVMCIEnv,                    _jvmti_can_hotswap_or_post_breakpoint,         bool)                                  \
+                                                                                                                                     \
+  nonstatic_field(Klass,                       _secondary_super_cache,                        Klass*)                                \
+  nonstatic_field(Klass,                       _secondary_supers,                             Array<Klass*>*)                        \
+  nonstatic_field(Klass,                       _super,                                        Klass*)                                \
+  nonstatic_field(Klass,                       _super_check_offset,                           juint)                                 \
+  nonstatic_field(Klass,                       _subklass,                                     Klass*)                                \
+  nonstatic_field(Klass,                       _layout_helper,                                jint)                                  \
+  nonstatic_field(Klass,                       _prototype_header,                             markOop)                               \
+  nonstatic_field(Klass,                       _next_sibling,                                 Klass*)                                \
+  nonstatic_field(Klass,                       _java_mirror,                                  oop)                                   \
+  nonstatic_field(Klass,                       _modifier_flags,                               jint)                                  \
+  nonstatic_field(Klass,                       _access_flags,                                 AccessFlags)                           \
+                                                                                                                                     \
+  nonstatic_field(LocalVariableTableElement,   start_bci,                                     u2)                                    \
+  nonstatic_field(LocalVariableTableElement,   length,                                        u2)                                    \
+  nonstatic_field(LocalVariableTableElement,   name_cp_index,                                 u2)                                    \
+  nonstatic_field(LocalVariableTableElement,   descriptor_cp_index,                           u2)                                    \
+  nonstatic_field(LocalVariableTableElement,   signature_cp_index,                            u2)                                    \
+  nonstatic_field(LocalVariableTableElement,   slot,                                          u2)                                    \
+                                                                                                                                     \
+  nonstatic_field(Method,                      _constMethod,                                  ConstMethod*)                          \
+  nonstatic_field(Method,                      _method_data,                                  MethodData*)                           \
+  nonstatic_field(Method,                      _method_counters,                              MethodCounters*)                       \
+  nonstatic_field(Method,                      _access_flags,                                 AccessFlags)                           \
+  nonstatic_field(Method,                      _vtable_index,                                 int)                                   \
+  nonstatic_field(Method,                      _intrinsic_id,                                 u2)                                    \
+  nonstatic_field(Method,                      _flags,                                        u1)                                    \
+  volatile_nonstatic_field(Method,             _code,                                         nmethod*)                              \
+  volatile_nonstatic_field(Method,             _from_compiled_entry,                          address)                               \
+                                                                                                                                     \
+  nonstatic_field(MethodCounters,              _invocation_counter,                           InvocationCounter)                     \
+  nonstatic_field(MethodCounters,              _backedge_counter,                             InvocationCounter)                     \
+                                                                                                                                     \
+  nonstatic_field(MethodData,                  _size,                                         int)                                   \
+  nonstatic_field(MethodData,                  _data_size,                                    int)                                   \
+  nonstatic_field(MethodData,                  _data[0],                                      intptr_t)                              \
+  nonstatic_field(MethodData,                  _trap_hist._array[0],                          u1)                                    \
+  nonstatic_field(MethodData,                  _jvmci_ir_size,                                int)                                   \
+                                                                                                                                     \
+  nonstatic_field(nmethod,                     _verified_entry_point,                         address)                               \
+  nonstatic_field(nmethod,                     _comp_level,                                   int)                                   \
+                                                                                                                                     \
+  nonstatic_field(ObjArrayKlass,               _element_klass,                                Klass*)                                \
+                                                                                                                                     \
+  volatile_nonstatic_field(oopDesc,            _mark,                                         markOop)                               \
+  volatile_nonstatic_field(oopDesc,            _metadata._klass,                              Klass*)                                \
+                                                                                                                                     \
+  static_field(os,                             _polling_page,                                 address)                               \
+                                                                                                                                     \
+  volatile_nonstatic_field(OSThread,           _interrupted,                                  jint)                                  \
+                                                                                                                                     \
+  static_field(StubRoutines,                _verify_oop_count,                                jint)                                  \
+                                                                                                                                     \
+  static_field(StubRoutines,                _jbyte_arraycopy,                                 address)                               \
+  static_field(StubRoutines,                _jshort_arraycopy,                                address)                               \
+  static_field(StubRoutines,                _jint_arraycopy,                                  address)                               \
+  static_field(StubRoutines,                _jlong_arraycopy,                                 address)                               \
+  static_field(StubRoutines,                _oop_arraycopy,                                   address)                               \
+  static_field(StubRoutines,                _oop_arraycopy_uninit,                            address)                               \
+  static_field(StubRoutines,                _jbyte_disjoint_arraycopy,                        address)                               \
+  static_field(StubRoutines,                _jshort_disjoint_arraycopy,                       address)                               \
+  static_field(StubRoutines,                _jint_disjoint_arraycopy,                         address)                               \
+  static_field(StubRoutines,                _jlong_disjoint_arraycopy,                        address)                               \
+  static_field(StubRoutines,                _oop_disjoint_arraycopy,                          address)                               \
+  static_field(StubRoutines,                _oop_disjoint_arraycopy_uninit,                   address)                               \
+  static_field(StubRoutines,                _arrayof_jbyte_arraycopy,                         address)                               \
+  static_field(StubRoutines,                _arrayof_jshort_arraycopy,                        address)                               \
+  static_field(StubRoutines,                _arrayof_jint_arraycopy,                          address)                               \
+  static_field(StubRoutines,                _arrayof_jlong_arraycopy,                         address)                               \
+  static_field(StubRoutines,                _arrayof_oop_arraycopy,                           address)                               \
+  static_field(StubRoutines,                _arrayof_oop_arraycopy_uninit,                    address)                               \
+  static_field(StubRoutines,                _arrayof_jbyte_disjoint_arraycopy,                address)                               \
+  static_field(StubRoutines,                _arrayof_jshort_disjoint_arraycopy,               address)                               \
+  static_field(StubRoutines,                _arrayof_jint_disjoint_arraycopy,                 address)                               \
+  static_field(StubRoutines,                _arrayof_jlong_disjoint_arraycopy,                address)                               \
+  static_field(StubRoutines,                _arrayof_oop_disjoint_arraycopy,                  address)                               \
+  static_field(StubRoutines,                _arrayof_oop_disjoint_arraycopy_uninit,           address)                               \
+  static_field(StubRoutines,                _checkcast_arraycopy,                             address)                               \
+  static_field(StubRoutines,                _checkcast_arraycopy_uninit,                      address)                               \
+  static_field(StubRoutines,                _unsafe_arraycopy,                                address)                               \
+  static_field(StubRoutines,                _generic_arraycopy,                               address)                               \
+                                                                                                                                     \
+  static_field(StubRoutines,                _aescrypt_encryptBlock,                           address)                               \
+  static_field(StubRoutines,                _aescrypt_decryptBlock,                           address)                               \
+  static_field(StubRoutines,                _cipherBlockChaining_encryptAESCrypt,             address)                               \
+  static_field(StubRoutines,                _cipherBlockChaining_decryptAESCrypt,             address)                               \
+  static_field(StubRoutines,                _updateBytesCRC32,                                address)                               \
+  static_field(StubRoutines,                _crc_table_adr,                                   address)                               \
+                                                                                                                                     \
+  nonstatic_field(Thread,                   _tlab,                                            ThreadLocalAllocBuffer)                \
+  nonstatic_field(Thread,                   _allocated_bytes,                                 jlong)                                 \
+                                                                                                                                     \
+  nonstatic_field(ThreadLocalAllocBuffer,   _start,                                           HeapWord*)                             \
+  nonstatic_field(ThreadLocalAllocBuffer,   _top,                                             HeapWord*)                             \
+  nonstatic_field(ThreadLocalAllocBuffer,   _end,                                             HeapWord*)                             \
+  nonstatic_field(ThreadLocalAllocBuffer,   _pf_top,                                          HeapWord*)                             \
+  nonstatic_field(ThreadLocalAllocBuffer,   _desired_size,                                    size_t)                                \
+  nonstatic_field(ThreadLocalAllocBuffer,   _refill_waste_limit,                              size_t)                                \
+  nonstatic_field(ThreadLocalAllocBuffer,   _number_of_refills,                               unsigned)                              \
+  nonstatic_field(ThreadLocalAllocBuffer,   _fast_refill_waste,                               unsigned)                              \
+  nonstatic_field(ThreadLocalAllocBuffer,   _slow_allocations,                                unsigned)                              \
+                                                                                                                                     \
+  nonstatic_field(ThreadShadow,             _pending_exception,                               oop)                                   \
+                                                                                                                                     \
+  static_field(vmSymbols,                   _symbols[0],                                      Symbol*)                               \
+                                                                                                                                     \
+  nonstatic_field(vtableEntry,              _method,                                          Method*)                               \
+
+#define VM_TYPES(declare_type, declare_toplevel_type, declare_integer_type, declare_unsigned_integer_type) \
+  declare_integer_type(bool)                                              \
+  declare_unsigned_integer_type(size_t)                                   \
+  declare_integer_type(intx)                                              \
+  declare_unsigned_integer_type(uintx)                                    \
+                                                                          \
+  declare_toplevel_type(BasicLock)                                        \
+  declare_toplevel_type(CompilerToVM)                                     \
+  declare_toplevel_type(ExceptionTableElement)                            \
+  declare_toplevel_type(Flag)                                             \
+  declare_toplevel_type(Flag*)                                            \
+  declare_toplevel_type(JVMCIEnv)                                         \
+  declare_toplevel_type(LocalVariableTableElement)                        \
+  declare_toplevel_type(narrowKlass)                                      \
+  declare_toplevel_type(Symbol*)                                          \
+  declare_toplevel_type(vtableEntry)                                      \
+                                                                          \
+  declare_toplevel_type(oopDesc)                                          \
+    declare_type(arrayOopDesc, oopDesc)                                   \
+                                                                          \
+  declare_toplevel_type(MetaspaceObj)                                     \
+    declare_type(Metadata, MetaspaceObj)                                  \
+    declare_type(Klass, Metadata)                                         \
+      declare_type(InstanceKlass, Klass)                                  \
+    declare_type(ConstantPool, Metadata)                                  \
+
+#define VM_INT_CONSTANTS(declare_constant, declare_constant_with_value, declare_preprocessor_constant) \
+  declare_preprocessor_constant("ASSERT", DEBUG_ONLY(1) NOT_DEBUG(0))     \
+  declare_preprocessor_constant("FIELDINFO_TAG_SIZE", FIELDINFO_TAG_SIZE) \
+  declare_preprocessor_constant("STACK_BIAS", STACK_BIAS)                 \
+                                                                          \
+  declare_constant(CompLevel_full_optimization)                           \
+  declare_constant(HeapWordSize)                                          \
+  declare_constant(InvocationEntryBci)                                    \
+  declare_constant(LogKlassAlignmentInBytes)                              \
+                                                                          \
+  declare_constant(JVM_ACC_WRITTEN_FLAGS)                                 \
+  declare_constant(JVM_ACC_MONITOR_MATCH)                                 \
+  declare_constant(JVM_ACC_HAS_MONITOR_BYTECODES)                         \
+  declare_constant(JVM_ACC_HAS_FINALIZER)                                 \
+  declare_constant(JVM_ACC_FIELD_INTERNAL)                                \
+  declare_constant(JVM_ACC_FIELD_STABLE)                                  \
+  declare_constant(JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE)                   \
+  declare_preprocessor_constant("JVM_ACC_SYNTHETIC", JVM_ACC_SYNTHETIC)   \
+  declare_preprocessor_constant("JVM_RECOGNIZED_FIELD_MODIFIERS", JVM_RECOGNIZED_FIELD_MODIFIERS) \
+                                                                          \
+  declare_constant(JVM_CONSTANT_Utf8)                                     \
+  declare_constant(JVM_CONSTANT_Unicode)                                  \
+  declare_constant(JVM_CONSTANT_Integer)                                  \
+  declare_constant(JVM_CONSTANT_Float)                                    \
+  declare_constant(JVM_CONSTANT_Long)                                     \
+  declare_constant(JVM_CONSTANT_Double)                                   \
+  declare_constant(JVM_CONSTANT_Class)                                    \
+  declare_constant(JVM_CONSTANT_String)                                   \
+  declare_constant(JVM_CONSTANT_Fieldref)                                 \
+  declare_constant(JVM_CONSTANT_Methodref)                                \
+  declare_constant(JVM_CONSTANT_InterfaceMethodref)                       \
+  declare_constant(JVM_CONSTANT_NameAndType)                              \
+  declare_constant(JVM_CONSTANT_MethodHandle)                             \
+  declare_constant(JVM_CONSTANT_MethodType)                               \
+  declare_constant(JVM_CONSTANT_InvokeDynamic)                            \
+  declare_constant(JVM_CONSTANT_ExternalMax)                              \
+                                                                          \
+  declare_constant(JVM_CONSTANT_Invalid)                                  \
+  declare_constant(JVM_CONSTANT_InternalMin)                              \
+  declare_constant(JVM_CONSTANT_UnresolvedClass)                          \
+  declare_constant(JVM_CONSTANT_ClassIndex)                               \
+  declare_constant(JVM_CONSTANT_StringIndex)                              \
+  declare_constant(JVM_CONSTANT_UnresolvedClassInError)                   \
+  declare_constant(JVM_CONSTANT_MethodHandleInError)                      \
+  declare_constant(JVM_CONSTANT_MethodTypeInError)                        \
+  declare_constant(JVM_CONSTANT_InternalMax)                              \
+                                                                          \
+  declare_constant(ArrayData::array_len_off_set)                          \
+  declare_constant(ArrayData::array_start_off_set)                        \
+                                                                          \
+  declare_constant(BitData::exception_seen_flag)                          \
+  declare_constant(BitData::null_seen_flag)                               \
+  declare_constant(BranchData::not_taken_off_set)                         \
+                                                                          \
+  declare_constant_with_value("CardTableModRefBS::dirty_card", CardTableModRefBS::dirty_card_val()) \
+                                                                          \
+  declare_constant(CodeInstaller::VERIFIED_ENTRY)                         \
+  declare_constant(CodeInstaller::UNVERIFIED_ENTRY)                       \
+  declare_constant(CodeInstaller::OSR_ENTRY)                              \
+  declare_constant(CodeInstaller::EXCEPTION_HANDLER_ENTRY)                \
+  declare_constant(CodeInstaller::DEOPT_HANDLER_ENTRY)                    \
+  declare_constant(CodeInstaller::INVOKEINTERFACE)                        \
+  declare_constant(CodeInstaller::INVOKEVIRTUAL)                          \
+  declare_constant(CodeInstaller::INVOKESTATIC)                           \
+  declare_constant(CodeInstaller::INVOKESPECIAL)                          \
+  declare_constant(CodeInstaller::INLINE_INVOKE)                          \
+  declare_constant(CodeInstaller::POLL_NEAR)                              \
+  declare_constant(CodeInstaller::POLL_RETURN_NEAR)                       \
+  declare_constant(CodeInstaller::POLL_FAR)                               \
+  declare_constant(CodeInstaller::POLL_RETURN_FAR)                        \
+  declare_constant(CodeInstaller::CARD_TABLE_SHIFT)                       \
+  declare_constant(CodeInstaller::CARD_TABLE_ADDRESS)                     \
+  declare_constant(CodeInstaller::HEAP_TOP_ADDRESS)                       \
+  declare_constant(CodeInstaller::HEAP_END_ADDRESS)                       \
+  declare_constant(CodeInstaller::NARROW_KLASS_BASE_ADDRESS)              \
+  declare_constant(CodeInstaller::CRC_TABLE_ADDRESS)                      \
+  declare_constant(CodeInstaller::INVOKE_INVALID)                         \
+                                                                          \
+  declare_constant(ConstantPool::CPCACHE_INDEX_TAG)                       \
+                                                                          \
+  declare_constant(ConstMethod::_has_linenumber_table)                    \
+  declare_constant(ConstMethod::_has_localvariable_table)                 \
+  declare_constant(ConstMethod::_has_exception_table)                     \
+                                                                          \
+  declare_constant(CounterData::count_off)                                \
+                                                                          \
+  declare_constant(DataLayout::cell_size)                                 \
+  declare_constant(DataLayout::no_tag)                                    \
+  declare_constant(DataLayout::bit_data_tag)                              \
+  declare_constant(DataLayout::counter_data_tag)                          \
+  declare_constant(DataLayout::jump_data_tag)                             \
+  declare_constant(DataLayout::receiver_type_data_tag)                    \
+  declare_constant(DataLayout::virtual_call_data_tag)                     \
+  declare_constant(DataLayout::ret_data_tag)                              \
+  declare_constant(DataLayout::branch_data_tag)                           \
+  declare_constant(DataLayout::multi_branch_data_tag)                     \
+  declare_constant(DataLayout::arg_info_data_tag)                         \
+  declare_constant(DataLayout::call_type_data_tag)                        \
+  declare_constant(DataLayout::virtual_call_type_data_tag)                \
+  declare_constant(DataLayout::parameters_type_data_tag)                  \
+  declare_constant(DataLayout::speculative_trap_data_tag)                 \
+                                                                          \
+  declare_constant(Deoptimization::Unpack_deopt)                          \
+  declare_constant(Deoptimization::Unpack_exception)                      \
+  declare_constant(Deoptimization::Unpack_uncommon_trap)                  \
+  declare_constant(Deoptimization::Unpack_reexecute)                      \
+                                                                          \
+  declare_constant(Deoptimization::_action_bits)                          \
+  declare_constant(Deoptimization::_reason_bits)                          \
+  declare_constant(Deoptimization::_debug_id_bits)                        \
+  declare_constant(Deoptimization::_action_shift)                         \
+  declare_constant(Deoptimization::_reason_shift)                         \
+  declare_constant(Deoptimization::_debug_id_shift)                       \
+                                                                          \
+  declare_constant(Deoptimization::Action_none)                           \
+  declare_constant(Deoptimization::Action_maybe_recompile)                \
+  declare_constant(Deoptimization::Action_reinterpret)                    \
+  declare_constant(Deoptimization::Action_make_not_entrant)               \
+  declare_constant(Deoptimization::Action_make_not_compilable)            \
+                                                                          \
+  declare_constant(Deoptimization::Reason_none)                           \
+  declare_constant(Deoptimization::Reason_null_check)                     \
+  declare_constant(Deoptimization::Reason_range_check)                    \
+  declare_constant(Deoptimization::Reason_class_check)                    \
+  declare_constant(Deoptimization::Reason_array_check)                    \
+  declare_constant(Deoptimization::Reason_unreached0)                     \
+  declare_constant(Deoptimization::Reason_constraint)                     \
+  declare_constant(Deoptimization::Reason_div0_check)                     \
+  declare_constant(Deoptimization::Reason_loop_limit_check)               \
+  declare_constant(Deoptimization::Reason_type_checked_inlining)          \
+  declare_constant(Deoptimization::Reason_optimized_type_check)           \
+  declare_constant(Deoptimization::Reason_aliasing)                       \
+  declare_constant(Deoptimization::Reason_transfer_to_interpreter)        \
+  declare_constant(Deoptimization::Reason_not_compiled_exception_handler) \
+  declare_constant(Deoptimization::Reason_unresolved)                     \
+  declare_constant(Deoptimization::Reason_jsr_mismatch)                   \
+  declare_constant(Deoptimization::Reason_LIMIT)                          \
+                                                                          \
+  declare_constant_with_value("dirtyCardQueueBufferOffset", in_bytes(DirtyCardQueue::byte_offset_of_buf())) \
+  declare_constant_with_value("dirtyCardQueueIndexOffset", in_bytes(DirtyCardQueue::byte_offset_of_index())) \
+                                                                          \
+  declare_constant(FieldInfo::access_flags_offset)                        \
+  declare_constant(FieldInfo::name_index_offset)                          \
+  declare_constant(FieldInfo::signature_index_offset)                     \
+  declare_constant(FieldInfo::initval_index_offset)                       \
+  declare_constant(FieldInfo::low_packed_offset)                          \
+  declare_constant(FieldInfo::high_packed_offset)                         \
+  declare_constant(FieldInfo::field_slots)                                \
+                                                                          \
+  declare_constant(InstanceKlass::linked)                                 \
+  declare_constant(InstanceKlass::fully_initialized)                      \
+                                                                          \
+  declare_constant(JumpData::taken_off_set)                               \
+  declare_constant(JumpData::displacement_off_set)                        \
+                                                                          \
+  declare_constant(JVMCIEnv::ok)                                          \
+  declare_constant(JVMCIEnv::dependencies_failed)                         \
+  declare_constant(JVMCIEnv::dependencies_invalid)                        \
+  declare_constant(JVMCIEnv::cache_full)                                  \
+  declare_constant(JVMCIEnv::code_too_large)                              \
+                                                                          \
+  declare_constant(Klass::_lh_neutral_value)                              \
+  declare_constant(Klass::_lh_instance_slow_path_bit)                     \
+  declare_constant(Klass::_lh_log2_element_size_shift)                    \
+  declare_constant(Klass::_lh_log2_element_size_mask)                     \
+  declare_constant(Klass::_lh_element_type_shift)                         \
+  declare_constant(Klass::_lh_element_type_mask)                          \
+  declare_constant(Klass::_lh_header_size_shift)                          \
+  declare_constant(Klass::_lh_header_size_mask)                           \
+  declare_constant(Klass::_lh_array_tag_shift)                            \
+  declare_constant(Klass::_lh_array_tag_type_value)                       \
+  declare_constant(Klass::_lh_array_tag_obj_value)                        \
+                                                                          \
+  declare_constant(markOopDesc::no_hash)                                  \
+                                                                          \
+  declare_constant(Method::_jfr_towrite)                                  \
+  declare_constant(Method::_caller_sensitive)                             \
+  declare_constant(Method::_force_inline)                                 \
+  declare_constant(Method::_dont_inline)                                  \
+  declare_constant(Method::_hidden)                                       \
+                                                                          \
+  declare_constant(Method::nonvirtual_vtable_index)                       \
+  declare_constant(Method::invalid_vtable_index)                          \
+                                                                          \
+  declare_constant(MultiBranchData::per_case_cell_count)                  \
+                                                                          \
+  declare_constant(ReceiverTypeData::nonprofiled_count_off_set)           \
+  declare_constant(ReceiverTypeData::receiver_type_row_cell_count)        \
+  declare_constant(ReceiverTypeData::receiver0_offset)                    \
+  declare_constant(ReceiverTypeData::count0_offset)                       \
+                                                                          \
+  declare_constant_with_value("satbMarkQueueBufferOffset", in_bytes(SATBMarkQueue::byte_offset_of_buf())) \
+  declare_constant_with_value("satbMarkQueueIndexOffset", in_bytes(SATBMarkQueue::byte_offset_of_index())) \
+  declare_constant_with_value("satbMarkQueueActiveOffset", in_bytes(SATBMarkQueue::byte_offset_of_active())) \
+                                                                          \
+  declare_constant(vmIntrinsics::_invokeBasic)                            \
+  declare_constant(vmIntrinsics::_linkToVirtual)                          \
+  declare_constant(vmIntrinsics::_linkToStatic)                           \
+  declare_constant(vmIntrinsics::_linkToSpecial)                          \
+  declare_constant(vmIntrinsics::_linkToInterface)                        \
+                                                                          \
+  declare_constant(vmSymbols::FIRST_SID)                                  \
+  declare_constant(vmSymbols::SID_LIMIT)                                  \
+
+#define VM_LONG_CONSTANTS(declare_constant, declare_preprocessor_constant) \
+  declare_constant(InvocationCounter::count_increment)                    \
+  declare_constant(InvocationCounter::count_shift)                        \
+                                                                          \
+  declare_constant(markOopDesc::hash_shift)                               \
+                                                                          \
+  declare_constant(markOopDesc::biased_lock_mask_in_place)                \
+  declare_constant(markOopDesc::age_mask_in_place)                        \
+  declare_constant(markOopDesc::epoch_mask_in_place)                      \
+  declare_constant(markOopDesc::hash_mask)                                \
+  declare_constant(markOopDesc::hash_mask_in_place)                       \
+                                                                          \
+  declare_constant(markOopDesc::unlocked_value)                           \
+  declare_constant(markOopDesc::biased_lock_pattern)                      \
+                                                                          \
+  declare_constant(markOopDesc::no_hash_in_place)                         \
+  declare_constant(markOopDesc::no_lock_in_place)                         \
+
+#define VM_ADDRESSES(declare_address, declare_preprocessor_address, declare_function) \
+  declare_function(SharedRuntime::register_finalizer)                     \
+  declare_function(SharedRuntime::exception_handler_for_return_address)   \
+  declare_function(SharedRuntime::OSR_migration_end)                      \
+  declare_function(SharedRuntime::dsin)                                   \
+  declare_function(SharedRuntime::dcos)                                   \
+  declare_function(SharedRuntime::dtan)                                   \
+  declare_function(SharedRuntime::dexp)                                   \
+  declare_function(SharedRuntime::dlog)                                   \
+  declare_function(SharedRuntime::dlog10)                                 \
+  declare_function(SharedRuntime::dpow)                                   \
+                                                                          \
+  declare_function(os::dll_load)                                          \
+  declare_function(os::dll_lookup)                                        \
+  declare_function(os::javaTimeMillis)                                    \
+  declare_function(os::javaTimeNanos)                                     \
+                                                                          \
+  declare_function(Deoptimization::fetch_unroll_info)                     \
+  COMPILER2_PRESENT(declare_function(Deoptimization::uncommon_trap))      \
+  declare_function(Deoptimization::unpack_frames)                         \
+                                                                          \
+  declare_function(JVMCIRuntime::new_instance) \
+  declare_function(JVMCIRuntime::new_array) \
+  declare_function(JVMCIRuntime::new_multi_array) \
+  declare_function(JVMCIRuntime::dynamic_new_array) \
+  declare_function(JVMCIRuntime::dynamic_new_instance) \
+  \
+  declare_function(JVMCIRuntime::thread_is_interrupted) \
+  declare_function(JVMCIRuntime::vm_message) \
+  declare_function(JVMCIRuntime::identity_hash_code) \
+  declare_function(JVMCIRuntime::exception_handler_for_pc) \
+  declare_function(JVMCIRuntime::monitorenter) \
+  declare_function(JVMCIRuntime::monitorexit) \
+  declare_function(JVMCIRuntime::create_null_exception) \
+  declare_function(JVMCIRuntime::create_out_of_bounds_exception) \
+  declare_function(JVMCIRuntime::log_primitive) \
+  declare_function(JVMCIRuntime::log_object) \
+  declare_function(JVMCIRuntime::log_printf) \
+  declare_function(JVMCIRuntime::vm_error) \
+  declare_function(JVMCIRuntime::load_and_clear_exception) \
+  declare_function(JVMCIRuntime::write_barrier_pre) \
+  declare_function(JVMCIRuntime::write_barrier_post) \
+  declare_function(JVMCIRuntime::validate_object) \
+  \
+  declare_function(JVMCIRuntime::test_deoptimize_call_int)
+
+
+#if INCLUDE_ALL_GCS
+
+#define VM_STRUCTS_G1(nonstatic_field, static_field) \
+  static_field(HeapRegion, LogOfHRGrainBytes, int)
+
+#define VM_INT_CONSTANTS_G1(declare_constant, declare_constant_with_value, declare_preprocessor_constant) \
+  declare_constant_with_value("G1SATBCardTableModRefBS::g1_young_gen", G1SATBCardTableModRefBS::g1_young_card_val())
+
+#endif // INCLUDE_ALL_GCS
+
+
+#ifdef TARGET_OS_FAMILY_linux
+
+#define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function) \
+  declare_preprocessor_address("RTLD_DEFAULT", RTLD_DEFAULT)
+
+#endif // TARGET_OS_FAMILY_linux
+
+
+#ifdef TARGET_OS_FAMILY_bsd
+
+#define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function) \
+  declare_preprocessor_address("RTLD_DEFAULT", RTLD_DEFAULT)
+
+#endif // TARGET_OS_FAMILY_bsd
+
+
+#ifdef TARGET_ARCH_x86
+
+#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \
+  volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*) \
+  static_field(VM_Version,                  _cpuFeatures,  uint64_t)
+
+#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) \
+  declare_toplevel_type(VM_Version)
+
+#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \
+  LP64_ONLY(declare_constant(frame::arg_reg_save_area_bytes))       \
+  declare_constant(frame::interpreter_frame_sender_sp_offset)       \
+  declare_constant(frame::interpreter_frame_last_sp_offset)         \
+  declare_constant(VM_Version::CPU_CX8)                             \
+  declare_constant(VM_Version::CPU_CMOV)                            \
+  declare_constant(VM_Version::CPU_FXSR)                            \
+  declare_constant(VM_Version::CPU_HT)                              \
+  declare_constant(VM_Version::CPU_MMX)                             \
+  declare_constant(VM_Version::CPU_3DNOW_PREFETCH)                  \
+  declare_constant(VM_Version::CPU_SSE)                             \
+  declare_constant(VM_Version::CPU_SSE2)                            \
+  declare_constant(VM_Version::CPU_SSE3)                            \
+  declare_constant(VM_Version::CPU_SSSE3)                           \
+  declare_constant(VM_Version::CPU_SSE4A)                           \
+  declare_constant(VM_Version::CPU_SSE4_1)                          \
+  declare_constant(VM_Version::CPU_SSE4_2)                          \
+  declare_constant(VM_Version::CPU_POPCNT)                          \
+  declare_constant(VM_Version::CPU_LZCNT)                           \
+  declare_constant(VM_Version::CPU_TSC)                             \
+  declare_constant(VM_Version::CPU_TSCINV)                          \
+  declare_constant(VM_Version::CPU_AVX)                             \
+  declare_constant(VM_Version::CPU_AVX2)                            \
+  declare_constant(VM_Version::CPU_AES)                             \
+  declare_constant(VM_Version::CPU_ERMS)                            \
+  declare_constant(VM_Version::CPU_CLMUL)                           \
+  declare_constant(VM_Version::CPU_BMI1)                            \
+  declare_constant(VM_Version::CPU_BMI2)                            \
+  declare_constant(VM_Version::CPU_RTM)                             \
+  declare_constant(VM_Version::CPU_ADX)                             \
+  declare_constant(VM_Version::CPU_AVX512F)                         \
+  declare_constant(VM_Version::CPU_AVX512DQ)                        \
+  declare_constant(VM_Version::CPU_AVX512PF)                        \
+  declare_constant(VM_Version::CPU_AVX512ER)                        \
+  declare_constant(VM_Version::CPU_AVX512CD)                        \
+  declare_constant(VM_Version::CPU_AVX512BW)
+
+#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \
+  declare_preprocessor_constant("VM_Version::CPU_AVX512VL", CPU_AVX512VL)
+
+#endif // TARGET_ARCH_x86
+
+
+/*
+ * Dummy defines for architectures that don't use these.
+ */
+#ifndef VM_STRUCTS_CPU
+#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field)
+#endif
+
+#ifndef VM_TYPES_CPU
+#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type)
+#endif
+
+#ifndef VM_INT_CONSTANTS_CPU
+#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
+#endif
+
+#ifndef VM_LONG_CONSTANTS_CPU
+#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
+#endif
+
+#ifndef VM_STRUCTS_OS
+#define VM_STRUCTS_OS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field)
+#endif
+
+#ifndef VM_TYPES_OS
+#define VM_TYPES_OS(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type)
+#endif
+
+#ifndef VM_INT_CONSTANTS_OS
+#define VM_INT_CONSTANTS_OS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
+#endif
+
+#ifndef VM_LONG_CONSTANTS_OS
+#define VM_LONG_CONSTANTS_OS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
+#endif
+
+#ifndef VM_ADDRESSES_OS
+#define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function)
+#endif
+
+
+// whole purpose of this function is to work around bug c++/27724 in gcc 4.1.1
+// with optimization turned on it doesn't affect produced code
+static inline uint64_t cast_uint64_t(size_t x)
+{
+  return x;
+}
+
+#define ASSIGN_CONST_TO_64BIT_VAR(var, expr) \
+  JNIEXPORT uint64_t var = cast_uint64_t(expr);
+
+#define ASSIGN_OFFSET_TO_64BIT_VAR(var, type, field)   \
+  ASSIGN_CONST_TO_64BIT_VAR(var, offset_of(type, field))
+
+#define ASSIGN_STRIDE_TO_64BIT_VAR(var, array) \
+  ASSIGN_CONST_TO_64BIT_VAR(var, (char*)&array[1] - (char*)&array[0])
+
+//
+// Instantiation of VMStructEntries, VMTypeEntries and VMIntConstantEntries
+//
+
+// These initializers are allowed to access private fields in classes
+// as long as class VMStructs is a friend
+VMStructEntry JVMCIVMStructs::localHotSpotVMStructs[] = {
+  VM_STRUCTS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
+             GENERATE_STATIC_VM_STRUCT_ENTRY,
+             GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
+             GENERATE_NONSTATIC_VM_STRUCT_ENTRY)
+
+  VM_STRUCTS_OS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
+                GENERATE_STATIC_VM_STRUCT_ENTRY,
+                GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
+                GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
+                GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
+                GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
+                GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
+                GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)
+
+  VM_STRUCTS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
+                 GENERATE_STATIC_VM_STRUCT_ENTRY,
+                 GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
+                 GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
+                 GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
+                 GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
+                 GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
+                 GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)
+
+#if INCLUDE_ALL_GCS
+  VM_STRUCTS_G1(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
+                GENERATE_STATIC_VM_STRUCT_ENTRY)
+#endif
+
+  GENERATE_VM_STRUCT_LAST_ENTRY()
+};
+
+VMTypeEntry JVMCIVMStructs::localHotSpotVMTypes[] = {
+  VM_TYPES(GENERATE_VM_TYPE_ENTRY,
+           GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
+           GENERATE_INTEGER_VM_TYPE_ENTRY,
+           GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY)
+
+  VM_TYPES_OS(GENERATE_VM_TYPE_ENTRY,
+              GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
+              GENERATE_OOP_VM_TYPE_ENTRY,
+              GENERATE_INTEGER_VM_TYPE_ENTRY,
+              GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
+              GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
+              GENERATE_C2_VM_TYPE_ENTRY,
+              GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
+
+  VM_TYPES_CPU(GENERATE_VM_TYPE_ENTRY,
+               GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
+               GENERATE_OOP_VM_TYPE_ENTRY,
+               GENERATE_INTEGER_VM_TYPE_ENTRY,
+               GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
+               GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
+               GENERATE_C2_VM_TYPE_ENTRY,
+               GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
+
+  GENERATE_VM_TYPE_LAST_ENTRY()
+};
+
+VMIntConstantEntry JVMCIVMStructs::localHotSpotVMIntConstants[] = {
+  VM_INT_CONSTANTS(GENERATE_VM_INT_CONSTANT_ENTRY,
+                   GENERATE_VM_INT_CONSTANT_WITH_VALUE_ENTRY,
+                   GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
+
+  VM_INT_CONSTANTS_OS(GENERATE_VM_INT_CONSTANT_ENTRY,
+                      GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
+                      GENERATE_C1_VM_INT_CONSTANT_ENTRY,
+                      GENERATE_C2_VM_INT_CONSTANT_ENTRY,
+                      GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
+
+  VM_INT_CONSTANTS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY,
+                       GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
+                       GENERATE_C1_VM_INT_CONSTANT_ENTRY,
+                       GENERATE_C2_VM_INT_CONSTANT_ENTRY,
+                       GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
+
+#if INCLUDE_ALL_GCS
+  VM_INT_CONSTANTS_G1(GENERATE_VM_INT_CONSTANT_ENTRY,
+                      GENERATE_VM_INT_CONSTANT_WITH_VALUE_ENTRY,
+                      GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
+#endif
+
+  GENERATE_VM_INT_CONSTANT_LAST_ENTRY()
+};
+
+VMLongConstantEntry JVMCIVMStructs::localHotSpotVMLongConstants[] = {
+  VM_LONG_CONSTANTS(GENERATE_VM_LONG_CONSTANT_ENTRY,
+                    GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
+
+  VM_LONG_CONSTANTS_OS(GENERATE_VM_LONG_CONSTANT_ENTRY,
+                       GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
+                       GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
+                       GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
+                       GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
+
+  VM_LONG_CONSTANTS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY,
+                        GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
+                        GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
+                        GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
+                        GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
+
+  GENERATE_VM_LONG_CONSTANT_LAST_ENTRY()
+};
+
+VMAddressEntry JVMCIVMStructs::localHotSpotVMAddresses[] = {
+  VM_ADDRESSES(GENERATE_VM_ADDRESS_ENTRY,
+               GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,
+               GENERATE_VM_FUNCTION_ENTRY)
+
+  VM_ADDRESSES_OS(GENERATE_VM_ADDRESS_ENTRY,
+                  GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,
+                  GENERATE_VM_FUNCTION_ENTRY)
+
+  GENERATE_VM_ADDRESS_LAST_ENTRY()
+};
+
+extern "C" {
+JNIEXPORT VMStructEntry* jvmciHotSpotVMStructs = JVMCIVMStructs::localHotSpotVMStructs;
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMStructEntryTypeNameOffset,   VMStructEntry, typeName);
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMStructEntryFieldNameOffset,  VMStructEntry, fieldName);
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMStructEntryTypeStringOffset, VMStructEntry, typeString);
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMStructEntryIsStaticOffset,   VMStructEntry, isStatic);
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMStructEntryOffsetOffset,     VMStructEntry, offset);
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMStructEntryAddressOffset,    VMStructEntry, address);
+ASSIGN_STRIDE_TO_64BIT_VAR(jvmciHotSpotVMStructEntryArrayStride, jvmciHotSpotVMStructs);
+
+JNIEXPORT VMTypeEntry* jvmciHotSpotVMTypes = JVMCIVMStructs::localHotSpotVMTypes;
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMTypeEntryTypeNameOffset,       VMTypeEntry, typeName);
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMTypeEntrySuperclassNameOffset, VMTypeEntry, superclassName);
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMTypeEntryIsOopTypeOffset,      VMTypeEntry, isOopType);
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMTypeEntryIsIntegerTypeOffset,  VMTypeEntry, isIntegerType);
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMTypeEntryIsUnsignedOffset,     VMTypeEntry, isUnsigned);
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMTypeEntrySizeOffset,           VMTypeEntry, size);
+ASSIGN_STRIDE_TO_64BIT_VAR(jvmciHotSpotVMTypeEntryArrayStride, jvmciHotSpotVMTypes);
+
+JNIEXPORT VMIntConstantEntry* jvmciHotSpotVMIntConstants = JVMCIVMStructs::localHotSpotVMIntConstants;
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMIntConstantEntryNameOffset,  VMIntConstantEntry, name);
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMIntConstantEntryValueOffset, VMIntConstantEntry, value);
+ASSIGN_STRIDE_TO_64BIT_VAR(jvmciHotSpotVMIntConstantEntryArrayStride, jvmciHotSpotVMIntConstants);
+
+JNIEXPORT VMLongConstantEntry* jvmciHotSpotVMLongConstants = JVMCIVMStructs::localHotSpotVMLongConstants;
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMLongConstantEntryNameOffset,  VMLongConstantEntry, name);
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMLongConstantEntryValueOffset, VMLongConstantEntry, value);
+ASSIGN_STRIDE_TO_64BIT_VAR(jvmciHotSpotVMLongConstantEntryArrayStride, jvmciHotSpotVMLongConstants);
+
+JNIEXPORT VMAddressEntry* jvmciHotSpotVMAddresses = JVMCIVMStructs::localHotSpotVMAddresses;
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMAddressEntryNameOffset,  VMAddressEntry, name);
+ASSIGN_OFFSET_TO_64BIT_VAR(jvmciHotSpotVMAddressEntryValueOffset, VMAddressEntry, value);
+ASSIGN_STRIDE_TO_64BIT_VAR(jvmciHotSpotVMAddressEntryArrayStride, jvmciHotSpotVMAddresses);
+}
--- a/hotspot/src/share/vm/jvmci/vmStructs_jvmci.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/jvmci/vmStructs_jvmci.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -25,113 +25,36 @@
 #ifndef SHARE_VM_JVMCI_VMSTRUCTS_JVMCI_HPP
 #define SHARE_VM_JVMCI_VMSTRUCTS_JVMCI_HPP
 
-#include "compiler/abstractCompiler.hpp"
-#include "jvmci/jvmciCodeInstaller.hpp"
-#include "jvmci/jvmciCompilerToVM.hpp"
-#include "jvmci/jvmciEnv.hpp"
-#include "jvmci/jvmciRuntime.hpp"
+#include "runtime/vmStructs.hpp"
 
-#define VM_STRUCTS_JVMCI(nonstatic_field, static_field)                               \
-  nonstatic_field(JavaThread,    _pending_deoptimization,               int)          \
-  nonstatic_field(JavaThread,    _pending_failed_speculation,           oop)          \
-  nonstatic_field(JavaThread,    _pending_transfer_to_interpreter,      bool)         \
-  nonstatic_field(JavaThread,    _jvmci_counters,                       jlong*)       \
-  nonstatic_field(MethodData,    _jvmci_ir_size,                        int)          \
-  nonstatic_field(JVMCIEnv,      _task,                                 CompileTask*) \
-  nonstatic_field(JVMCIEnv,      _jvmti_can_hotswap_or_post_breakpoint, bool)         \
-  nonstatic_field(DeoptimizationBlob, _uncommon_trap_offset,            int)          \
-  \
-  static_field(CompilerToVM, _supports_inline_contig_alloc, bool) \
-  static_field(CompilerToVM, _heap_end_addr, HeapWord**) \
-  static_field(CompilerToVM, _heap_top_addr, HeapWord**)
+class JVMCIVMStructs {
+public:
+  /**
+   * The last entry has a NULL fieldName.
+   */
+  static VMStructEntry localHotSpotVMStructs[];
 
-#define VM_TYPES_JVMCI(declare_type, declare_toplevel_type)                   \
-  declare_toplevel_type(CompilerToVM)                                         \
-  declare_toplevel_type(JVMCIEnv)                                             \
+  /**
+   * The last entry has a NULL typeName.
+   */
+  static VMTypeEntry localHotSpotVMTypes[];
 
-#define VM_INT_CONSTANTS_JVMCI(declare_constant, declare_preprocessor_constant)                   \
-  declare_constant(Deoptimization::Reason_unreached0)                                             \
-  declare_constant(Deoptimization::Reason_type_checked_inlining)                                  \
-  declare_constant(Deoptimization::Reason_optimized_type_check)                                   \
-  declare_constant(Deoptimization::Reason_aliasing)                                               \
-  declare_constant(Deoptimization::Reason_transfer_to_interpreter)                                \
-  declare_constant(Deoptimization::Reason_not_compiled_exception_handler)                         \
-  declare_constant(Deoptimization::Reason_unresolved)                                             \
-  declare_constant(Deoptimization::Reason_jsr_mismatch)                                           \
-  declare_constant(JVMCIEnv::ok)                                                                  \
-  declare_constant(JVMCIEnv::dependencies_failed)                                                 \
-  declare_constant(JVMCIEnv::dependencies_invalid)                                                \
-  declare_constant(JVMCIEnv::cache_full)                                                          \
-  declare_constant(JVMCIEnv::code_too_large)                                                      \
-                                                                                                  \
-  declare_preprocessor_constant("JVM_ACC_SYNTHETIC", JVM_ACC_SYNTHETIC)                           \
-  declare_preprocessor_constant("JVM_RECOGNIZED_FIELD_MODIFIERS", JVM_RECOGNIZED_FIELD_MODIFIERS) \
-                                                                                                  \
-  declare_constant(CompilerToVM::KLASS_TAG)                                                       \
-  declare_constant(CompilerToVM::SYMBOL_TAG)                                                      \
-                                                                                                  \
-  declare_constant(BitData::exception_seen_flag)                                                  \
-  declare_constant(BitData::null_seen_flag)                                                       \
-  declare_constant(CounterData::count_off)                                                        \
-  declare_constant(JumpData::taken_off_set)                                                       \
-  declare_constant(JumpData::displacement_off_set)                                                \
-  declare_constant(ReceiverTypeData::nonprofiled_count_off_set)                                   \
-  declare_constant(ReceiverTypeData::receiver_type_row_cell_count)                                \
-  declare_constant(ReceiverTypeData::receiver0_offset)                                            \
-  declare_constant(ReceiverTypeData::count0_offset)                                               \
-  declare_constant(BranchData::not_taken_off_set)                                                 \
-  declare_constant(ArrayData::array_len_off_set)                                                  \
-  declare_constant(ArrayData::array_start_off_set)                                                \
-  declare_constant(MultiBranchData::per_case_cell_count)                                          \
-                                                                                                  \
-  declare_constant(CodeInstaller::VERIFIED_ENTRY)                                                 \
-  declare_constant(CodeInstaller::UNVERIFIED_ENTRY)                                               \
-  declare_constant(CodeInstaller::OSR_ENTRY)                                                      \
-  declare_constant(CodeInstaller::EXCEPTION_HANDLER_ENTRY)                                        \
-  declare_constant(CodeInstaller::DEOPT_HANDLER_ENTRY)                                            \
-  declare_constant(CodeInstaller::INVOKEINTERFACE)                                                \
-  declare_constant(CodeInstaller::INVOKEVIRTUAL)                                                  \
-  declare_constant(CodeInstaller::INVOKESTATIC)                                                   \
-  declare_constant(CodeInstaller::INVOKESPECIAL)                                                  \
-  declare_constant(CodeInstaller::INLINE_INVOKE)                                                  \
-  declare_constant(CodeInstaller::POLL_NEAR)                                                      \
-  declare_constant(CodeInstaller::POLL_RETURN_NEAR)                                               \
-  declare_constant(CodeInstaller::POLL_FAR)                                                       \
-  declare_constant(CodeInstaller::POLL_RETURN_FAR)                                                \
-  declare_constant(CodeInstaller::CARD_TABLE_SHIFT)                                               \
-  declare_constant(CodeInstaller::CARD_TABLE_ADDRESS)                                             \
-  declare_constant(CodeInstaller::HEAP_TOP_ADDRESS)                                               \
-  declare_constant(CodeInstaller::HEAP_END_ADDRESS)                                               \
-  declare_constant(CodeInstaller::NARROW_KLASS_BASE_ADDRESS)                                      \
-  declare_constant(CodeInstaller::CRC_TABLE_ADDRESS)                                              \
-  declare_constant(CodeInstaller::INVOKE_INVALID)                                                 \
-                                                                                                  \
-  declare_constant(Method::invalid_vtable_index)                                                  \
+  /**
+   * Table of integer constants.
+   * The last entry has a NULL typeName.
+   */
+  static VMIntConstantEntry localHotSpotVMIntConstants[];
 
-#define VM_ADDRESSES_JVMCI(declare_address, declare_preprocessor_address, declare_function)      \
-  declare_function(JVMCIRuntime::new_instance) \
-  declare_function(JVMCIRuntime::new_array) \
-  declare_function(JVMCIRuntime::new_multi_array) \
-  declare_function(JVMCIRuntime::dynamic_new_array) \
-  declare_function(JVMCIRuntime::dynamic_new_instance) \
-  \
-  declare_function(JVMCIRuntime::thread_is_interrupted) \
-  declare_function(JVMCIRuntime::vm_message) \
-  declare_function(JVMCIRuntime::identity_hash_code) \
-  declare_function(JVMCIRuntime::exception_handler_for_pc) \
-  declare_function(JVMCIRuntime::monitorenter) \
-  declare_function(JVMCIRuntime::monitorexit) \
-  declare_function(JVMCIRuntime::create_null_exception) \
-  declare_function(JVMCIRuntime::create_out_of_bounds_exception) \
-  declare_function(JVMCIRuntime::log_primitive) \
-  declare_function(JVMCIRuntime::log_object) \
-  declare_function(JVMCIRuntime::log_printf) \
-  declare_function(JVMCIRuntime::vm_error) \
-  declare_function(JVMCIRuntime::load_and_clear_exception) \
-  declare_function(JVMCIRuntime::write_barrier_pre) \
-  declare_function(JVMCIRuntime::write_barrier_post) \
-  declare_function(JVMCIRuntime::validate_object) \
-  \
-  declare_function(JVMCIRuntime::test_deoptimize_call_int)
+  /**
+   * Table of long constants.
+   * The last entry has a NULL typeName.
+   */
+  static VMLongConstantEntry localHotSpotVMLongConstants[];
+
+  /**
+   * Table of addresses.
+   */
+  static VMAddressEntry localHotSpotVMAddresses[];
+};
 
 #endif // SHARE_VM_JVMCI_VMSTRUCTS_JVMCI_HPP
--- a/hotspot/src/share/vm/oops/constMethod.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/oops/constMethod.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -166,9 +166,9 @@
 #undef INLINE_TABLE_PARAM
 #undef INLINE_TABLE_DECLARE
 
-
 class ConstMethod : public MetaspaceObj {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 
 public:
   typedef enum { NORMAL, OVERPASS } MethodType;
--- a/hotspot/src/share/vm/oops/constantPool.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/oops/constantPool.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -74,6 +74,7 @@
 
 class ConstantPool : public Metadata {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
   friend class BytecodeInterpreter;  // Directly extracts a klass in the pool for fast instanceof/checkcast
   friend class Universe;             // For null constructor
  private:
--- a/hotspot/src/share/vm/oops/instanceKlass.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -108,6 +108,7 @@
 
 class InstanceKlass: public Klass {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
   friend class ClassFileParser;
   friend class CompileReplay;
 
--- a/hotspot/src/share/vm/oops/klass.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/oops/klass.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -60,6 +60,7 @@
 
 class Klass : public Metadata {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
  protected:
   // note: put frequently-used fields together at start of klass structure
   // for better cache behavior (may not make much of a difference but sure won't hurt)
--- a/hotspot/src/share/vm/oops/klassVtable.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/oops/klassVtable.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -155,6 +155,7 @@
 //      from_interpreter_entry_point   -> i2cadapter
 class vtableEntry VALUE_OBJ_CLASS_SPEC {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 
  public:
   // size in words
--- a/hotspot/src/share/vm/oops/method.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/oops/method.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -61,6 +61,7 @@
 
 class Method : public Metadata {
  friend class VMStructs;
+ friend class JVMCIVMStructs;
  private:
   ConstMethod*      _constMethod;                // Method read-only data.
   MethodData*       _method_data;
--- a/hotspot/src/share/vm/oops/methodCounters.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/oops/methodCounters.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -32,6 +32,7 @@
 
 class MethodCounters: public MetaspaceObj {
  friend class VMStructs;
+ friend class JVMCIVMStructs;
  private:
   int               _interpreter_invocation_count; // Count of times invoked (reused as prev_event_count in tiered)
   u2                _interpreter_throwout_count; // Count of times method was exited via exception while interpreting
--- a/hotspot/src/share/vm/oops/methodData.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/oops/methodData.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -73,6 +73,7 @@
 // Overlay for generic profiling data.
 class DataLayout VALUE_OBJ_CLASS_SPEC {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 
 private:
   // Every data layout begins with a header.  This header
@@ -536,6 +537,7 @@
 // A BitData holds a flag or two in its header.
 class BitData : public ProfileData {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 protected:
   enum {
     // null_seen:
@@ -605,6 +607,7 @@
 // A CounterData corresponds to a simple counter.
 class CounterData : public BitData {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 protected:
   enum {
     count_off,
@@ -670,6 +673,7 @@
 // the corresponding target bci.
 class JumpData : public ProfileData {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 protected:
   enum {
     taken_off_set,
@@ -1177,6 +1181,7 @@
 // which are used to store a type profile for the receiver of the check.
 class ReceiverTypeData : public CounterData {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 protected:
   enum {
 #if INCLUDE_JVMCI
@@ -1683,6 +1688,7 @@
 // for the taken case.
 class BranchData : public JumpData {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 protected:
   enum {
     not_taken_off_set = jump_cell_count,
@@ -1760,6 +1766,7 @@
 // and an array start.
 class ArrayData : public ProfileData {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 protected:
   friend class DataLayout;
 
@@ -1838,6 +1845,7 @@
 // case was taken and specify the data displacment for each branch target.
 class MultiBranchData : public ArrayData {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 protected:
   enum {
     default_count_off_set,
@@ -2137,6 +2145,7 @@
 
 class MethodData : public Metadata {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
   CC_INTERP_ONLY(friend class BytecodeInterpreter;)
 private:
   friend class ProfileData;
--- a/hotspot/src/share/vm/oops/objArrayKlass.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/oops/objArrayKlass.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -33,6 +33,7 @@
 
 class ObjArrayKlass : public ArrayKlass {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
  private:
   Klass* _element_klass;            // The klass of the elements of this array type
   Klass* _bottom_klass;             // The one-dimensional type (InstanceKlass or TypeArrayKlass)
--- a/hotspot/src/share/vm/oops/oop.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/oops/oop.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -58,6 +58,7 @@
 
 class oopDesc {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
  private:
   volatile markOop  _mark;
   union _metadata {
--- a/hotspot/src/share/vm/runtime/basicLock.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/runtime/basicLock.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -31,6 +31,7 @@
 
 class BasicLock VALUE_OBJ_CLASS_SPEC {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
  private:
   volatile markOop _displaced_header;
  public:
--- a/hotspot/src/share/vm/runtime/deoptimization.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/runtime/deoptimization.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -168,6 +168,7 @@
   // This is only a CheapObj to ease debugging after a deopt failure
   class UnrollBlock : public CHeapObj<mtCompiler> {
     friend class VMStructs;
+    friend class JVMCIVMStructs;
    private:
     int       _size_of_deoptimized_frame; // Size, in bytes, of current deoptimized frame
     int       _caller_adjustment;         // Adjustment, in bytes, to caller's SP by initial interpreted frame
--- a/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -48,6 +48,7 @@
 friend class JavaThread;
 friend class frame;
 friend class VMStructs;
+friend class JVMCIVMStructs;
 friend class BytecodeInterpreter;
 friend class JavaCallWrapper;
 
--- a/hotspot/src/share/vm/runtime/os.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/runtime/os.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -102,6 +102,7 @@
 
 class os: AllStatic {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
   friend class MallocTracker;
  public:
   enum { page_sizes_max = 9 }; // Size of _page_sizes array (8 plus a sentinel)
--- a/hotspot/src/share/vm/runtime/osThread.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/runtime/osThread.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -60,6 +60,7 @@
 
 class OSThread: public CHeapObj<mtThread> {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
  private:
   OSThreadStartFunc _start_proc;  // Thread start routine
   void* _start_parm;              // Thread start routine parameter
--- a/hotspot/src/share/vm/runtime/thread.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/runtime/thread.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -101,6 +101,7 @@
 
 class Thread: public ThreadShadow {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
  private:
   // Exception handling
   // (Note: _pending_exception and friends are in ThreadShadow)
@@ -775,6 +776,7 @@
 
 class JavaThread: public Thread {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
   friend class WhiteBox;
  private:
   JavaThread*    _next;                          // The next thread in the Threads list
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Mon Dec 14 17:02:02 2015 -1000
@@ -2844,104 +2844,6 @@
 
 
 //--------------------------------------------------------------------------------
-// VM_ADDRESSES
-//
-
-#define VM_ADDRESSES(declare_address, declare_preprocessor_address, declare_function) \
-                                                                          \
-  declare_function(SharedRuntime::register_finalizer)                     \
-  declare_function(SharedRuntime::exception_handler_for_return_address)   \
-  declare_function(SharedRuntime::OSR_migration_end)                      \
-  declare_function(SharedRuntime::dsin)                                   \
-  declare_function(SharedRuntime::dcos)                                   \
-  declare_function(SharedRuntime::dtan)                                   \
-  declare_function(SharedRuntime::dexp)                                   \
-  declare_function(SharedRuntime::dlog)                                   \
-  declare_function(SharedRuntime::dlog10)                                 \
-  declare_function(SharedRuntime::dpow)                                   \
-                                                                          \
-  declare_function(os::dll_load)                                          \
-  declare_function(os::dll_lookup)                                        \
-  declare_function(os::javaTimeMillis)                                    \
-  declare_function(os::javaTimeNanos)                                     \
-                                                                          \
-  declare_function(Deoptimization::fetch_unroll_info)                     \
-  COMPILER2_PRESENT(declare_function(Deoptimization::uncommon_trap))      \
-  declare_function(Deoptimization::unpack_frames)
-
-//--------------------------------------------------------------------------------
-// Macros operating on the above lists
-//--------------------------------------------------------------------------------
-
-// This utility macro quotes the passed string
-#define QUOTE(x) #x
-
-//--------------------------------------------------------------------------------
-// VMStructEntry macros
-//
-
-// This macro generates a VMStructEntry line for a nonstatic field
-#define GENERATE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)              \
- { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 0, offset_of(typeName, fieldName), NULL },
-
-// This macro generates a VMStructEntry line for a static field
-#define GENERATE_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)                 \
- { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 1, 0, &typeName::fieldName },
-
-// This macro generates a VMStructEntry line for a static pointer volatile field,
-// e.g.: "static ObjectMonitor * volatile gBlockList;"
-#define GENERATE_STATIC_PTR_VOLATILE_VM_STRUCT_ENTRY(typeName, fieldName, type)    \
- { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 1, 0, (void *)&typeName::fieldName },
-
-// This macro generates a VMStructEntry line for an unchecked
-// nonstatic field, in which the size of the type is also specified.
-// The type string is given as NULL, indicating an "opaque" type.
-#define GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, size)    \
-  { QUOTE(typeName), QUOTE(fieldName), NULL, 0, offset_of(typeName, fieldName), NULL },
-
-// This macro generates a VMStructEntry line for an unchecked
-// static field, in which the size of the type is also specified.
-// The type string is given as NULL, indicating an "opaque" type.
-#define GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, size)       \
- { QUOTE(typeName), QUOTE(fieldName), NULL, 1, 0, (void*) &typeName::fieldName },
-
-// This macro generates the sentinel value indicating the end of the list
-#define GENERATE_VM_STRUCT_LAST_ENTRY() \
- { NULL, NULL, NULL, 0, 0, NULL }
-
-// This macro checks the type of a VMStructEntry by comparing pointer types
-#define CHECK_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)                 \
- {typeName *dummyObj = NULL; type* dummy = &dummyObj->fieldName;                   \
-  assert(offset_of(typeName, fieldName) < sizeof(typeName), "Illegal nonstatic struct entry, field offset too large"); }
-
-// This macro checks the type of a volatile VMStructEntry by comparing pointer types
-#define CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)        \
- {typedef type dummyvtype; typeName *dummyObj = NULL; volatile dummyvtype* dummy = &dummyObj->fieldName; }
-
-// This macro checks the type of a static VMStructEntry by comparing pointer types
-#define CHECK_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)                    \
- {type* dummy = &typeName::fieldName; }
-
-// This macro checks the type of a static pointer volatile VMStructEntry by comparing pointer types,
-// e.g.: "static ObjectMonitor * volatile gBlockList;"
-#define CHECK_STATIC_PTR_VOLATILE_VM_STRUCT_ENTRY(typeName, fieldName, type)       \
- {type volatile * dummy = &typeName::fieldName; }
-
-// This macro ensures the type of a field and its containing type are
-// present in the type table. The assertion string is shorter than
-// preferable because (incredibly) of a bug in Solstice NFS client
-// which seems to prevent very long lines from compiling. This assertion
-// means that an entry in VMStructs::localHotSpotVMStructs[] was not
-// found in VMStructs::localHotSpotVMTypes[].
-#define ENSURE_FIELD_TYPE_PRESENT(typeName, fieldName, type)                       \
- { assert(findType(QUOTE(typeName)) != 0, "type \"" QUOTE(typeName) "\" not found in type table"); \
-   assert(findType(QUOTE(type)) != 0, "type \"" QUOTE(type) "\" not found in type table"); }
-
-// This is a no-op macro for unchecked fields
-#define CHECK_NO_OP(a, b, c)
-
-//
-// Build-specific macros:
 //
 
 // Generate and check a nonstatic field in non-product builds
@@ -2997,35 +2899,7 @@
 #endif /* COMPILER2 */
 
 //--------------------------------------------------------------------------------
-// VMTypeEntry macros
-//
-
-#define GENERATE_VM_TYPE_ENTRY(type, superclass) \
- { QUOTE(type), QUOTE(superclass), 0, 0, 0, sizeof(type) },
-
-#define GENERATE_TOPLEVEL_VM_TYPE_ENTRY(type) \
- { QUOTE(type), NULL,              0, 0, 0, sizeof(type) },
-
-#define GENERATE_OOP_VM_TYPE_ENTRY(type) \
- { QUOTE(type), NULL,              1, 0, 0, sizeof(type) },
-
-#define GENERATE_INTEGER_VM_TYPE_ENTRY(type) \
- { QUOTE(type), NULL,              0, 1, 0, sizeof(type) },
-
-#define GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY(type) \
- { QUOTE(type), NULL,              0, 1, 1, sizeof(type) },
-
-#define GENERATE_VM_TYPE_LAST_ENTRY() \
- { NULL, NULL, 0, 0, 0, 0 }
-
-#define CHECK_VM_TYPE_ENTRY(type, superclass) \
- { type* dummyObj = NULL; superclass* dummySuperObj = dummyObj; }
-
-#define CHECK_VM_TYPE_NO_OP(a)
-#define CHECK_SINGLE_ARG_VM_TYPE_NO_OP(a)
-
-//
-// Build-specific macros:
+// VMTypeEntry build-specific macros
 //
 
 #ifdef COMPILER1
@@ -3050,23 +2924,9 @@
 
 
 //--------------------------------------------------------------------------------
-// VMIntConstantEntry macros
+// VMIntConstantEntry build-specific macros
 //
 
-#define GENERATE_VM_INT_CONSTANT_ENTRY(name) \
- { QUOTE(name), (int32_t) name },
-
-#define GENERATE_VM_INT_CONSTANT_WITH_VALUE_ENTRY(name, value) \
- { (name), (int32_t)(value) },
-
-#define GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) \
- { name, (int32_t) value },
-
-// This macro generates the sentinel value indicating the end of the list
-#define GENERATE_VM_INT_CONSTANT_LAST_ENTRY() \
- { NULL, 0 }
-
-
 // Generate an int constant for a C1 build
 #ifdef COMPILER1
 # define GENERATE_C1_VM_INT_CONSTANT_ENTRY(name)  GENERATE_VM_INT_CONSTANT_ENTRY(name)
@@ -3083,20 +2943,11 @@
 # define GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value)
 #endif /* COMPILER1 */
 
+
 //--------------------------------------------------------------------------------
-// VMLongConstantEntry macros
+// VMLongConstantEntry build-specific macros
 //
 
-#define GENERATE_VM_LONG_CONSTANT_ENTRY(name) \
-  { QUOTE(name), name },
-
-#define GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) \
-  { name, value },
-
-// This macro generates the sentinel value indicating the end of the list
-#define GENERATE_VM_LONG_CONSTANT_LAST_ENTRY() \
- { NULL, 0 }
-
 // Generate a long constant for a C1 build
 #ifdef COMPILER1
 # define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name)  GENERATE_VM_LONG_CONSTANT_ENTRY(name)
@@ -3113,22 +2964,6 @@
 # define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value)
 #endif /* COMPILER1 */
 
-//--------------------------------------------------------------------------------
-// VMAddressEntry macros
-//
-
-#define GENERATE_VM_ADDRESS_ENTRY(name) \
-  { QUOTE(name), (void*) (name) },
-
-#define GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY(name, value) \
-  { name, (void*) (value) },
-
-#define GENERATE_VM_FUNCTION_ENTRY(name) \
-  { QUOTE(name), CAST_FROM_FN_PTR(void*, &(name)) },
-
-// This macro generates the sentinel value indicating the end of the list
-#define GENERATE_VM_ADDRESS_LAST_ENTRY() \
- { NULL, NULL }
 
 //
 // Instantiation of VMStructEntries, VMTypeEntries and VMIntConstantEntries
@@ -3149,11 +2984,6 @@
              GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
              GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)
 
-#if INCLUDE_JVMCI
-  VM_STRUCTS_JVMCI(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
-                   GENERATE_STATIC_VM_STRUCT_ENTRY)
-#endif
-
 #if INCLUDE_ALL_GCS
   VM_STRUCTS_PARALLELGC(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
                         GENERATE_STATIC_VM_STRUCT_ENTRY)
@@ -3215,11 +3045,6 @@
            GENERATE_C2_VM_TYPE_ENTRY,
            GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
 
-#if INCLUDE_JVMCI
-  VM_TYPES_JVMCI(GENERATE_VM_TYPE_ENTRY,
-                 GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
-#endif
-
 #if INCLUDE_ALL_GCS
   VM_TYPES_PARALLELGC(GENERATE_VM_TYPE_ENTRY,
                       GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
@@ -3279,12 +3104,6 @@
                    GENERATE_C2_VM_INT_CONSTANT_ENTRY,
                    GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
 
-#if INCLUDE_JVMCI
-  VM_INT_CONSTANTS_JVMCI(GENERATE_VM_INT_CONSTANT_ENTRY,
-                         GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
-
-#endif
-
 #if INCLUDE_ALL_GCS
   VM_INT_CONSTANTS_CMS(GENERATE_VM_INT_CONSTANT_ENTRY)
 
@@ -3348,25 +3167,6 @@
   GENERATE_VM_LONG_CONSTANT_LAST_ENTRY()
 };
 
-VMAddressEntry VMStructs::localHotSpotVMAddresses[] = {
-
-  VM_ADDRESSES(GENERATE_VM_ADDRESS_ENTRY,
-               GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,
-               GENERATE_VM_FUNCTION_ENTRY)
-
-  VM_ADDRESSES_OS(GENERATE_VM_ADDRESS_ENTRY,
-                  GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,
-                  GENERATE_VM_FUNCTION_ENTRY)
-
-#if INCLUDE_JVMCI
-  VM_ADDRESSES_JVMCI(GENERATE_VM_ADDRESS_ENTRY,
-                     GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,
-                     GENERATE_VM_FUNCTION_ENTRY)
-#endif
-
-  GENERATE_VM_ADDRESS_LAST_ENTRY()
-};
-
 // This is used both to check the types of referenced fields and, in
 // debug builds, to ensure that all of the field types are present.
 void
@@ -3575,11 +3375,6 @@
 JNIEXPORT uint64_t gHotSpotVMLongConstantEntryNameOffset = offset_of(VMLongConstantEntry, name);
 JNIEXPORT uint64_t gHotSpotVMLongConstantEntryValueOffset = offset_of(VMLongConstantEntry, value);
 JNIEXPORT uint64_t gHotSpotVMLongConstantEntryArrayStride = STRIDE(gHotSpotVMLongConstants);
-
-JNIEXPORT VMAddressEntry* gHotSpotVMAddresses = VMStructs::localHotSpotVMAddresses;
-JNIEXPORT uint64_t gHotSpotVMAddressEntryNameOffset = offset_of(VMAddressEntry, name);
-JNIEXPORT uint64_t gHotSpotVMAddressEntryValueOffset = offset_of(VMAddressEntry, value);
-JNIEXPORT uint64_t gHotSpotVMAddressEntryArrayStride = STRIDE(gHotSpotVMAddresses);
 }
 
 #ifdef ASSERT
@@ -3687,11 +3482,6 @@
                 &long_last_entry,
                 sizeof(VMLongConstantEntry)) == 0, "Incorrect last entry in localHotSpotVMLongConstants");
 
-  static VMAddressEntry address_last_entry = GENERATE_VM_ADDRESS_LAST_ENTRY();
-  assert(memcmp(&localHotSpotVMAddresses[sizeof(localHotSpotVMAddresses) / sizeof(VMAddressEntry) - 1],
-                &address_last_entry,
-                sizeof(VMAddressEntry)) == 0, "Incorrect last entry in localHotSpotVMAddresses");
-
 
   // Check for duplicate entries in type array
   for (int i = 0; localHotSpotVMTypes[i].typeName != NULL; i++) {
--- a/hotspot/src/share/vm/runtime/vmStructs.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/runtime/vmStructs.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -143,4 +143,151 @@
   static int findType(const char* typeName);
 };
 
+// This utility macro quotes the passed string
+#define QUOTE(x) #x
+
+//--------------------------------------------------------------------------------
+// VMStructEntry macros
+//
+
+// This macro generates a VMStructEntry line for a nonstatic field
+#define GENERATE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)              \
+ { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 0, offset_of(typeName, fieldName), NULL },
+
+// This macro generates a VMStructEntry line for a static field
+#define GENERATE_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)                 \
+ { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 1, 0, &typeName::fieldName },
+
+// This macro generates a VMStructEntry line for a static pointer volatile field,
+// e.g.: "static ObjectMonitor * volatile gBlockList;"
+#define GENERATE_STATIC_PTR_VOLATILE_VM_STRUCT_ENTRY(typeName, fieldName, type)    \
+ { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 1, 0, (void *)&typeName::fieldName },
+
+// This macro generates a VMStructEntry line for an unchecked
+// nonstatic field, in which the size of the type is also specified.
+// The type string is given as NULL, indicating an "opaque" type.
+#define GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, size)    \
+  { QUOTE(typeName), QUOTE(fieldName), NULL, 0, offset_of(typeName, fieldName), NULL },
+
+// This macro generates a VMStructEntry line for an unchecked
+// static field, in which the size of the type is also specified.
+// The type string is given as NULL, indicating an "opaque" type.
+#define GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, size)       \
+ { QUOTE(typeName), QUOTE(fieldName), NULL, 1, 0, (void*) &typeName::fieldName },
+
+// This macro generates the sentinel value indicating the end of the list
+#define GENERATE_VM_STRUCT_LAST_ENTRY() \
+ { NULL, NULL, NULL, 0, 0, NULL }
+
+// This macro checks the type of a VMStructEntry by comparing pointer types
+#define CHECK_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)                 \
+ {typeName *dummyObj = NULL; type* dummy = &dummyObj->fieldName;                   \
+  assert(offset_of(typeName, fieldName) < sizeof(typeName), "Illegal nonstatic struct entry, field offset too large"); }
+
+// This macro checks the type of a volatile VMStructEntry by comparing pointer types
+#define CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)        \
+ {typedef type dummyvtype; typeName *dummyObj = NULL; volatile dummyvtype* dummy = &dummyObj->fieldName; }
+
+// This macro checks the type of a static VMStructEntry by comparing pointer types
+#define CHECK_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)                    \
+ {type* dummy = &typeName::fieldName; }
+
+// This macro checks the type of a static pointer volatile VMStructEntry by comparing pointer types,
+// e.g.: "static ObjectMonitor * volatile gBlockList;"
+#define CHECK_STATIC_PTR_VOLATILE_VM_STRUCT_ENTRY(typeName, fieldName, type)       \
+ {type volatile * dummy = &typeName::fieldName; }
+
+// This macro ensures the type of a field and its containing type are
+// present in the type table. The assertion string is shorter than
+// preferable because (incredibly) of a bug in Solstice NFS client
+// which seems to prevent very long lines from compiling. This assertion
+// means that an entry in VMStructs::localHotSpotVMStructs[] was not
+// found in VMStructs::localHotSpotVMTypes[].
+#define ENSURE_FIELD_TYPE_PRESENT(typeName, fieldName, type)                       \
+ { assert(findType(QUOTE(typeName)) != 0, "type \"" QUOTE(typeName) "\" not found in type table"); \
+   assert(findType(QUOTE(type)) != 0, "type \"" QUOTE(type) "\" not found in type table"); }
+
+// This is a no-op macro for unchecked fields
+#define CHECK_NO_OP(a, b, c)
+
+
+//--------------------------------------------------------------------------------
+// VMTypeEntry macros
+//
+
+#define GENERATE_VM_TYPE_ENTRY(type, superclass) \
+ { QUOTE(type), QUOTE(superclass), 0, 0, 0, sizeof(type) },
+
+#define GENERATE_TOPLEVEL_VM_TYPE_ENTRY(type) \
+ { QUOTE(type), NULL,              0, 0, 0, sizeof(type) },
+
+#define GENERATE_OOP_VM_TYPE_ENTRY(type) \
+ { QUOTE(type), NULL,              1, 0, 0, sizeof(type) },
+
+#define GENERATE_INTEGER_VM_TYPE_ENTRY(type) \
+ { QUOTE(type), NULL,              0, 1, 0, sizeof(type) },
+
+#define GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY(type) \
+ { QUOTE(type), NULL,              0, 1, 1, sizeof(type) },
+
+#define GENERATE_VM_TYPE_LAST_ENTRY() \
+ { NULL, NULL, 0, 0, 0, 0 }
+
+#define CHECK_VM_TYPE_ENTRY(type, superclass) \
+ { type* dummyObj = NULL; superclass* dummySuperObj = dummyObj; }
+
+#define CHECK_VM_TYPE_NO_OP(a)
+#define CHECK_SINGLE_ARG_VM_TYPE_NO_OP(a)
+
+
+//--------------------------------------------------------------------------------
+// VMIntConstantEntry macros
+//
+
+#define GENERATE_VM_INT_CONSTANT_ENTRY(name) \
+ { QUOTE(name), (int32_t) name },
+
+#define GENERATE_VM_INT_CONSTANT_WITH_VALUE_ENTRY(name, value) \
+ { (name), (int32_t)(value) },
+
+#define GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) \
+ { name, (int32_t) value },
+
+// This macro generates the sentinel value indicating the end of the list
+#define GENERATE_VM_INT_CONSTANT_LAST_ENTRY() \
+ { NULL, 0 }
+
+
+//--------------------------------------------------------------------------------
+// VMLongConstantEntry macros
+//
+
+#define GENERATE_VM_LONG_CONSTANT_ENTRY(name) \
+  { QUOTE(name), name },
+
+#define GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) \
+  { name, value },
+
+// This macro generates the sentinel value indicating the end of the list
+#define GENERATE_VM_LONG_CONSTANT_LAST_ENTRY() \
+ { NULL, 0 }
+
+
+//--------------------------------------------------------------------------------
+// VMAddressEntry macros
+//
+
+#define GENERATE_VM_ADDRESS_ENTRY(name) \
+  { QUOTE(name), (void*) (name) },
+
+#define GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY(name, value) \
+  { name, (void*) (value) },
+
+#define GENERATE_VM_FUNCTION_ENTRY(name) \
+  { QUOTE(name), CAST_FROM_FN_PTR(void*, &(name)) },
+
+// This macro generates the sentinel value indicating the end of the list
+#define GENERATE_VM_ADDRESS_LAST_ENTRY() \
+ { NULL, NULL }
+
 #endif // SHARE_VM_RUNTIME_VMSTRUCTS_HPP
--- a/hotspot/src/share/vm/utilities/array.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/utilities/array.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -304,6 +304,7 @@
 class Array: public MetaspaceObj {
   friend class MetadataFactory;
   friend class VMStructs;
+  friend class JVMCIVMStructs;
   friend class MethodHandleCompiler;           // special case
   friend class WhiteBox;
 protected:
--- a/hotspot/src/share/vm/utilities/exceptions.hpp	Tue Dec 08 14:26:17 2015 +0000
+++ b/hotspot/src/share/vm/utilities/exceptions.hpp	Mon Dec 14 17:02:02 2015 -1000
@@ -59,6 +59,7 @@
 
 class ThreadShadow: public CHeapObj<mtThread> {
   friend class VMStructs;
+  friend class JVMCIVMStructs;
 
  protected:
   oop  _pending_exception;                       // Thread has gc actions.