--- a/hotspot/src/share/vm/runtime/vmStructs.cpp Wed Jul 05 23:37:13 2017 +0200
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp Thu Jun 08 20:28:04 2017 +0200
@@ -66,6 +66,7 @@
#include "memory/referenceType.hpp"
#include "memory/universe.hpp"
#include "memory/virtualspace.hpp"
+#include "oops/array.hpp"
#include "oops/arrayKlass.hpp"
#include "oops/arrayOop.hpp"
#include "oops/compiledICHolder.hpp"
@@ -101,7 +102,6 @@
#include "runtime/thread.inline.hpp"
#include "runtime/vframeArray.hpp"
#include "runtime/vmStructs.hpp"
-#include "utilities/array.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/hashtable.hpp"
#include "utilities/macros.hpp"
@@ -194,9 +194,9 @@
typedef Hashtable<Symbol*, mtSymbol> SymbolHashtable;
typedef HashtableEntry<Symbol*, mtClass> SymbolHashtableEntry;
typedef Hashtable<oop, mtSymbol> StringHashtable;
-typedef TwoOopHashtable<Klass*, mtClass> KlassTwoOopHashtable;
-typedef Hashtable<Klass*, mtClass> KlassHashtable;
-typedef HashtableEntry<Klass*, mtClass> KlassHashtableEntry;
+typedef TwoOopHashtable<InstanceKlass*, mtClass> KlassTwoOopHashtable;
+typedef Hashtable<InstanceKlass*, mtClass> KlassHashtable;
+typedef HashtableEntry<InstanceKlass*, mtClass> KlassHashtableEntry;
typedef TwoOopHashtable<Symbol*, mtClass> SymbolTwoOopHashtable;
typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
typedef RehashableHashtable<Symbol*, mtSymbol> RehashableSymbolHashtable;
@@ -237,9 +237,10 @@
nonstatic_field(ConstantPool, _cache, ConstantPoolCache*) \
nonstatic_field(ConstantPool, _pool_holder, InstanceKlass*) \
nonstatic_field(ConstantPool, _operands, Array<u2>*) \
+ nonstatic_field(ConstantPool, _resolved_klasses, Array<Klass*>*) \
nonstatic_field(ConstantPool, _length, int) \
- nonstatic_field(ConstantPool, _resolved_references, jobject) \
- nonstatic_field(ConstantPool, _reference_map, Array<u2>*) \
+ nonstatic_field(ConstantPoolCache, _resolved_references, jobject) \
+ nonstatic_field(ConstantPoolCache, _reference_map, Array<u2>*) \
nonstatic_field(ConstantPoolCache, _length, int) \
nonstatic_field(ConstantPoolCache, _constant_pool, ConstantPool*) \
volatile_nonstatic_field(InstanceKlass, _array_klasses, Klass*) \
@@ -2057,6 +2058,8 @@
declare_c2_type(MulVFNode, VectorNode) \
declare_c2_type(MulReductionVFNode, ReductionNode) \
declare_c2_type(MulVDNode, VectorNode) \
+ declare_c2_type(FmaVDNode, VectorNode) \
+ declare_c2_type(FmaVFNode, VectorNode) \
declare_c2_type(CMoveVDNode, VectorNode) \
declare_c2_type(MulReductionVDNode, ReductionNode) \
declare_c2_type(DivVFNode, VectorNode) \
@@ -3050,6 +3053,10 @@
GENERATE_VM_STRUCT_LAST_ENTRY()
};
+size_t VMStructs::localHotSpotVMStructsLength() {
+ return sizeof(localHotSpotVMStructs) / sizeof(VMStructEntry);
+}
+
VMTypeEntry VMStructs::localHotSpotVMTypes[] = {
VM_TYPES(GENERATE_VM_TYPE_ENTRY,
@@ -3112,6 +3119,10 @@
GENERATE_VM_TYPE_LAST_ENTRY()
};
+size_t VMStructs::localHotSpotVMTypesLength() {
+ return sizeof(localHotSpotVMTypes) / sizeof(VMTypeEntry);
+}
+
VMIntConstantEntry VMStructs::localHotSpotVMIntConstants[] = {
VM_INT_CONSTANTS(GENERATE_VM_INT_CONSTANT_ENTRY,
@@ -3154,6 +3165,10 @@
GENERATE_VM_INT_CONSTANT_LAST_ENTRY()
};
+size_t VMStructs::localHotSpotVMIntConstantsLength() {
+ return sizeof(localHotSpotVMIntConstants) / sizeof(VMIntConstantEntry);
+}
+
VMLongConstantEntry VMStructs::localHotSpotVMLongConstants[] = {
VM_LONG_CONSTANTS(GENERATE_VM_LONG_CONSTANT_ENTRY,
@@ -3183,6 +3198,10 @@
GENERATE_VM_LONG_CONSTANT_LAST_ENTRY()
};
+size_t VMStructs::localHotSpotVMLongConstantsLength() {
+ return sizeof(localHotSpotVMLongConstants) / sizeof(VMLongConstantEntry);
+}
+
// 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
@@ -3474,45 +3493,3 @@
void vmStructs_init() {
debug_only(VMStructs::init());
}
-
-#ifndef PRODUCT
-void VMStructs::test() {
- // Make sure last entry in the each array is indeed the correct end marker.
- // The reason why these are static is to make sure they are zero initialized.
- // Putting them on the stack will leave some garbage in the padding of some fields.
- static VMStructEntry struct_last_entry = GENERATE_VM_STRUCT_LAST_ENTRY();
- assert(memcmp(&localHotSpotVMStructs[(sizeof(localHotSpotVMStructs) / sizeof(VMStructEntry)) - 1],
- &struct_last_entry,
- sizeof(VMStructEntry)) == 0, "Incorrect last entry in localHotSpotVMStructs");
-
- static VMTypeEntry type_last_entry = GENERATE_VM_TYPE_LAST_ENTRY();
- assert(memcmp(&localHotSpotVMTypes[sizeof(localHotSpotVMTypes) / sizeof(VMTypeEntry) - 1],
- &type_last_entry,
- sizeof(VMTypeEntry)) == 0, "Incorrect last entry in localHotSpotVMTypes");
-
- static VMIntConstantEntry int_last_entry = GENERATE_VM_INT_CONSTANT_LAST_ENTRY();
- assert(memcmp(&localHotSpotVMIntConstants[sizeof(localHotSpotVMIntConstants) / sizeof(VMIntConstantEntry) - 1],
- &int_last_entry,
- sizeof(VMIntConstantEntry)) == 0, "Incorrect last entry in localHotSpotVMIntConstants");
-
- static VMLongConstantEntry long_last_entry = GENERATE_VM_LONG_CONSTANT_LAST_ENTRY();
- assert(memcmp(&localHotSpotVMLongConstants[sizeof(localHotSpotVMLongConstants) / sizeof(VMLongConstantEntry) - 1],
- &long_last_entry,
- sizeof(VMLongConstantEntry)) == 0, "Incorrect last entry in localHotSpotVMLongConstants");
-
-
- // Check for duplicate entries in type array
- for (int i = 0; localHotSpotVMTypes[i].typeName != NULL; i++) {
- for (int j = i + 1; localHotSpotVMTypes[j].typeName != NULL; j++) {
- if (strcmp(localHotSpotVMTypes[i].typeName, localHotSpotVMTypes[j].typeName) == 0) {
- tty->print_cr("Duplicate entries for '%s'", localHotSpotVMTypes[i].typeName);
- assert(false, "Duplicate types in localHotSpotVMTypes array");
- }
- }
- }
-}
-
-void VMStructs_test() {
- VMStructs::test();
-}
-#endif