< prev index next >

src/hotspot/share/memory/universe.hpp

Print this page

126   static Array<Klass*>*         _the_empty_klass_array;          // Canonicalized klass array
127   static Array<InstanceKlass*>* _the_empty_instance_klass_array; // Canonicalized instance klass array
128   static Array<Method*>*        _the_empty_method_array;         // Canonicalized method array
129 
130   static Array<Klass*>*  _the_array_interfaces_array;
131 
132   // array of preallocated error objects with backtrace
133   static OopHandle     _preallocated_out_of_memory_error_array;
134 
135   // number of preallocated error objects available for use
136   static volatile jint _preallocated_out_of_memory_error_avail_count;
137 
138   // preallocated message detail strings for error objects
139   static OopHandle _msg_metaspace;
140   static OopHandle _msg_class_metaspace;
141 
142   static OopHandle    _null_ptr_exception_instance;   // preallocated exception object
143   static OopHandle    _arithmetic_exception_instance; // preallocated exception object
144   static OopHandle    _virtual_machine_error_instance; // preallocated exception object
145 




146   // References waiting to be transferred to the ReferenceHandler
147   static OopHandle    _reference_pending_list;
148 
149   // The particular choice of collected heap.
150   static CollectedHeap* _collectedHeap;
151 
152   static intptr_t _non_oop_bits;
153 
154   // array of dummy objects used with +FullGCAlot
155   debug_only(static OopHandle   _fullgc_alot_dummy_array;)
156   debug_only(static int         _fullgc_alot_dummy_next;)
157 
158   // Compiler/dispatch support
159   static int  _base_vtable_size;                      // Java vtbl size of klass Object (in words)
160 
161   // Initialization
162   static bool _bootstrapping;                         // true during genesis
163   static bool _module_initialized;                    // true after call_initPhase2 called
164   static bool _fully_initialized;                     // true after universe_init and initialize_vtables called
165 

187   static oop check_mirror(oop m) {
188     assert(m != nullptr, "mirror not initialized");
189     return m;
190   }
191 
192   // Debugging
193   static int _verify_count;                           // number of verifies done
194   static long verify_flags;
195 
196   static uintptr_t _verify_oop_mask;
197   static uintptr_t _verify_oop_bits;
198 
199   // Table of primitive type mirrors, excluding T_OBJECT and T_ARRAY
200   // but including T_VOID, hence the index including T_VOID
201   static OopHandle _basic_type_mirrors[T_VOID+1];
202 
203 #if INCLUDE_CDS_JAVA_HEAP
204   // Each slot i stores an index that can be used to restore _basic_type_mirrors[i]
205   // from the archive heap using HeapShared::get_root(int)
206   static int _archived_basic_type_mirror_indices[T_VOID+1];







207 #endif
208 
209  public:
210   static void calculate_verify_data(HeapWord* low_boundary, HeapWord* high_boundary) PRODUCT_RETURN;
211   static void set_verify_data(uintptr_t mask, uintptr_t bits) PRODUCT_RETURN;
212 
213   // Known classes in the VM
214   static Klass* boolArrayKlassObj()                 { return typeArrayKlassObj(T_BOOLEAN); }
215   static Klass* byteArrayKlassObj()                 { return typeArrayKlassObj(T_BYTE); }
216   static Klass* charArrayKlassObj()                 { return typeArrayKlassObj(T_CHAR); }
217   static Klass* intArrayKlassObj()                  { return typeArrayKlassObj(T_INT); }
218   static Klass* shortArrayKlassObj()                { return typeArrayKlassObj(T_SHORT); }
219   static Klass* longArrayKlassObj()                 { return typeArrayKlassObj(T_LONG); }
220   static Klass* floatArrayKlassObj()                { return typeArrayKlassObj(T_FLOAT); }
221   static Klass* doubleArrayKlassObj()               { return typeArrayKlassObj(T_DOUBLE); }
222 
223   static Klass* objectArrayKlassObj()               { return _objectArrayKlassObj; }
224 
225   static Klass* fillerArrayKlassObj()               { return _fillerArrayKlassObj; }
226 

230     assert(_typeArrayKlassObjs[t] != nullptr, "domain check");
231     return _typeArrayKlassObjs[t];
232   }
233 
234   // Known objects in the VM
235   static oop int_mirror();
236   static oop float_mirror();
237   static oop double_mirror();
238   static oop byte_mirror();
239   static oop bool_mirror();
240   static oop char_mirror();
241   static oop long_mirror();
242   static oop short_mirror();
243   static oop void_mirror();
244 
245   static oop java_mirror(BasicType t);
246 
247 #if INCLUDE_CDS_JAVA_HEAP
248   static void set_archived_basic_type_mirror_index(BasicType t, int index);
249   static void update_archived_basic_type_mirrors();





















250 #endif
251 
252   static oop      main_thread_group();
253   static void set_main_thread_group(oop group);
254 
255   static oop      system_thread_group();
256   static void set_system_thread_group(oop group);
257 
258   static objArrayOop  the_empty_class_array ();
259 
260   static oop          the_null_string();
261   static oop          the_min_jint_string();
262 
263   static oop          null_ptr_exception_instance();
264   static oop          arithmetic_exception_instance();
265   static oop          virtual_machine_error_instance();
266   static oop          vm_exception()                  { return virtual_machine_error_instance(); }
267 




268   static Array<Klass*>* the_array_interfaces_array()  { return _the_array_interfaces_array;   }
269   static Method*      finalizer_register_method()     { return _finalizer_register_cache->get_method(); }
270   static Method*      loader_addClass_method()        { return _loader_addClass_cache->get_method(); }
271 
272   static Method*      throw_illegal_access_error()    { return _throw_illegal_access_error_cache->get_method(); }
273   static Method*      throw_no_such_method_error()    { return _throw_no_such_method_error_cache->get_method(); }
274 
275   static Method*      do_stack_walk_method()          { return _do_stack_walk_cache->get_method(); }
276 
277   static oop          the_null_sentinel();
278   static address      the_null_sentinel_addr()        { return (address) &_the_null_sentinel;  }
279 
280   // Function to initialize these
281   static void initialize_known_methods(TRAPS);
282 
283   static void create_preallocated_out_of_memory_errors(TRAPS);
284 
285   // Reference pending list manipulation.  Access is protected by
286   // Heap_lock.  The getter, setter and predicate require the caller
287   // owns the lock.  Swap is used by parallel non-concurrent reference

126   static Array<Klass*>*         _the_empty_klass_array;          // Canonicalized klass array
127   static Array<InstanceKlass*>* _the_empty_instance_klass_array; // Canonicalized instance klass array
128   static Array<Method*>*        _the_empty_method_array;         // Canonicalized method array
129 
130   static Array<Klass*>*  _the_array_interfaces_array;
131 
132   // array of preallocated error objects with backtrace
133   static OopHandle     _preallocated_out_of_memory_error_array;
134 
135   // number of preallocated error objects available for use
136   static volatile jint _preallocated_out_of_memory_error_avail_count;
137 
138   // preallocated message detail strings for error objects
139   static OopHandle _msg_metaspace;
140   static OopHandle _msg_class_metaspace;
141 
142   static OopHandle    _null_ptr_exception_instance;   // preallocated exception object
143   static OopHandle    _arithmetic_exception_instance; // preallocated exception object
144   static OopHandle    _virtual_machine_error_instance; // preallocated exception object
145 
146   static OopHandle    _array_index_oob_exception_instance; // preallocated exception object
147   static OopHandle    _array_store_exception_instance;     // preallocated exception object
148   static OopHandle    _class_cast_exception_instance;      // preallocated exception object
149 
150   // References waiting to be transferred to the ReferenceHandler
151   static OopHandle    _reference_pending_list;
152 
153   // The particular choice of collected heap.
154   static CollectedHeap* _collectedHeap;
155 
156   static intptr_t _non_oop_bits;
157 
158   // array of dummy objects used with +FullGCAlot
159   debug_only(static OopHandle   _fullgc_alot_dummy_array;)
160   debug_only(static int         _fullgc_alot_dummy_next;)
161 
162   // Compiler/dispatch support
163   static int  _base_vtable_size;                      // Java vtbl size of klass Object (in words)
164 
165   // Initialization
166   static bool _bootstrapping;                         // true during genesis
167   static bool _module_initialized;                    // true after call_initPhase2 called
168   static bool _fully_initialized;                     // true after universe_init and initialize_vtables called
169 

191   static oop check_mirror(oop m) {
192     assert(m != nullptr, "mirror not initialized");
193     return m;
194   }
195 
196   // Debugging
197   static int _verify_count;                           // number of verifies done
198   static long verify_flags;
199 
200   static uintptr_t _verify_oop_mask;
201   static uintptr_t _verify_oop_bits;
202 
203   // Table of primitive type mirrors, excluding T_OBJECT and T_ARRAY
204   // but including T_VOID, hence the index including T_VOID
205   static OopHandle _basic_type_mirrors[T_VOID+1];
206 
207 #if INCLUDE_CDS_JAVA_HEAP
208   // Each slot i stores an index that can be used to restore _basic_type_mirrors[i]
209   // from the archive heap using HeapShared::get_root(int)
210   static int _archived_basic_type_mirror_indices[T_VOID+1];
211 
212   static int _archived_null_ptr_exception_instance_index;
213   static int _archived_arithmetic_exception_instance_index;
214   static int _archived_virtual_machine_error_instance_index;
215   static int _archived_array_index_oob_exception_instance_index;
216   static int _archived_array_store_exception_instance_index;
217   static int _archived_class_cast_exception_instance_index;
218 #endif
219 
220  public:
221   static void calculate_verify_data(HeapWord* low_boundary, HeapWord* high_boundary) PRODUCT_RETURN;
222   static void set_verify_data(uintptr_t mask, uintptr_t bits) PRODUCT_RETURN;
223 
224   // Known classes in the VM
225   static Klass* boolArrayKlassObj()                 { return typeArrayKlassObj(T_BOOLEAN); }
226   static Klass* byteArrayKlassObj()                 { return typeArrayKlassObj(T_BYTE); }
227   static Klass* charArrayKlassObj()                 { return typeArrayKlassObj(T_CHAR); }
228   static Klass* intArrayKlassObj()                  { return typeArrayKlassObj(T_INT); }
229   static Klass* shortArrayKlassObj()                { return typeArrayKlassObj(T_SHORT); }
230   static Klass* longArrayKlassObj()                 { return typeArrayKlassObj(T_LONG); }
231   static Klass* floatArrayKlassObj()                { return typeArrayKlassObj(T_FLOAT); }
232   static Klass* doubleArrayKlassObj()               { return typeArrayKlassObj(T_DOUBLE); }
233 
234   static Klass* objectArrayKlassObj()               { return _objectArrayKlassObj; }
235 
236   static Klass* fillerArrayKlassObj()               { return _fillerArrayKlassObj; }
237 

241     assert(_typeArrayKlassObjs[t] != nullptr, "domain check");
242     return _typeArrayKlassObjs[t];
243   }
244 
245   // Known objects in the VM
246   static oop int_mirror();
247   static oop float_mirror();
248   static oop double_mirror();
249   static oop byte_mirror();
250   static oop bool_mirror();
251   static oop char_mirror();
252   static oop long_mirror();
253   static oop short_mirror();
254   static oop void_mirror();
255 
256   static oop java_mirror(BasicType t);
257 
258 #if INCLUDE_CDS_JAVA_HEAP
259   static void set_archived_basic_type_mirror_index(BasicType t, int index);
260   static void update_archived_basic_type_mirrors();
261 
262   static void set_archived_null_ptr_exception_instance_index(int index) {
263     _archived_null_ptr_exception_instance_index = index;
264   }
265   static void set_archived_arithmetic_exception_instance_index(int index) {
266     _archived_arithmetic_exception_instance_index = index;
267   }
268   static void set_archived_virtual_machine_error_instance_index(int index) {
269     _archived_virtual_machine_error_instance_index = index;
270   }
271   static void set_archived_array_index_oob_exception_instance_index(int index) {
272     _archived_array_index_oob_exception_instance_index = index;
273   }
274   static void set_archived_array_store_exception_instance_index(int index) {
275     _archived_array_store_exception_instance_index = index;
276   }
277   static void set_archived_class_cast_exception_instance_index(int index) {
278     _archived_class_cast_exception_instance_index = index;
279   }
280 
281   static void update_exception_instances();
282 #endif
283 
284   static oop      main_thread_group();
285   static void set_main_thread_group(oop group);
286 
287   static oop      system_thread_group();
288   static void set_system_thread_group(oop group);
289 
290   static objArrayOop  the_empty_class_array ();
291 
292   static oop          the_null_string();
293   static oop          the_min_jint_string();
294 
295   static oop          null_ptr_exception_instance();
296   static oop          arithmetic_exception_instance();
297   static oop          virtual_machine_error_instance();
298   static oop          vm_exception()                  { return virtual_machine_error_instance(); }
299 
300   static oop          array_index_oob_exception_instance();
301   static oop          array_store_exception_instance();
302   static oop          class_cast_exception_instance();
303 
304   static Array<Klass*>* the_array_interfaces_array()  { return _the_array_interfaces_array;   }
305   static Method*      finalizer_register_method()     { return _finalizer_register_cache->get_method(); }
306   static Method*      loader_addClass_method()        { return _loader_addClass_cache->get_method(); }
307 
308   static Method*      throw_illegal_access_error()    { return _throw_illegal_access_error_cache->get_method(); }
309   static Method*      throw_no_such_method_error()    { return _throw_no_such_method_error_cache->get_method(); }
310 
311   static Method*      do_stack_walk_method()          { return _do_stack_walk_cache->get_method(); }
312 
313   static oop          the_null_sentinel();
314   static address      the_null_sentinel_addr()        { return (address) &_the_null_sentinel;  }
315 
316   // Function to initialize these
317   static void initialize_known_methods(TRAPS);
318 
319   static void create_preallocated_out_of_memory_errors(TRAPS);
320 
321   // Reference pending list manipulation.  Access is protected by
322   // Heap_lock.  The getter, setter and predicate require the caller
323   // owns the lock.  Swap is used by parallel non-concurrent reference
< prev index next >