comparison src/share/vm/runtime/vmStructs.hpp @ 23679:b5557b757040

fix HotSpotVMConfig startup performance (JDK-8159167)
author Doug Simon <doug.simon@oracle.com>
date Wed, 15 Jun 2016 00:00:41 +0200
parents 1bbd4a7c274b
children
comparison
equal deleted inserted replaced
23678:e86a0b0ba969 23679:b5557b757040
93 typedef struct { 93 typedef struct {
94 const char* name; // Name of constant (example: "_thread_in_native") 94 const char* name; // Name of constant (example: "_thread_in_native")
95 uint64_t value; // Value of constant 95 uint64_t value; // Value of constant
96 } VMLongConstantEntry; 96 } VMLongConstantEntry;
97 97
98 typedef struct {
99 const char* name; // Name of address (example: "SharedRuntime::register_finalizer")
100 void* value; // Value of address
101 } VMAddressEntry;
102
98 // This class is a friend of most classes, to be able to access 103 // This class is a friend of most classes, to be able to access
99 // private fields 104 // private fields
100 class VMStructs { 105 class VMStructs {
101 public: 106 public:
102 // The last entry is identified over in the serviceability agent by 107 // The last entry is identified over in the serviceability agent by
115 // Table of long constants required by the serviceability agent. 120 // Table of long constants required by the serviceability agent.
116 // The last entry is identified over in the serviceability agent by 121 // The last entry is identified over in the serviceability agent by
117 // the fact that it has a NULL typeName 122 // the fact that it has a NULL typeName
118 static VMLongConstantEntry localHotSpotVMLongConstants[]; 123 static VMLongConstantEntry localHotSpotVMLongConstants[];
119 124
125 /**
126 * Table of addresses.
127 */
128 static VMAddressEntry localHotSpotVMAddresses[];
129
120 // This is used to run any checking code necessary for validation of 130 // This is used to run any checking code necessary for validation of
121 // the data structure (debug build only) 131 // the data structure (debug build only)
122 static void init(); 132 static void init();
123 133
124 #ifndef PRODUCT 134 #ifndef PRODUCT
125 // Execute unit tests 135 // Execute unit tests
126 static void test(); 136 static void test();
127 #endif 137 #endif
128 138
129 #if INCLUDE_JVMCI 139 #if INCLUDE_JVMCI
130 // The definition of this method is generated by 140 static int localHotSpotVMStructs_count();
131 // jdk.vm.ci.hotspotvmconfig.HotSpotVMConfigProcessor. 141 static int localHotSpotVMTypes_count();
132 static void initHotSpotVMConfig(oop config); 142 static int localHotSpotVMIntConstants_count();
143 static int localHotSpotVMLongConstants_count();
144 static int localHotSpotVMAddresses_count();
133 #endif 145 #endif
134 146
135 private: 147 private:
136 // Look up a type in localHotSpotVMTypes using strcmp() (debug build only). 148 // Look up a type in localHotSpotVMTypes using strcmp() (debug build only).
137 // Returns 1 if found, 0 if not. 149 // Returns 1 if found, 0 if not.