< prev index next >

src/hotspot/share/memory/universe.hpp

Print this page

100   static OopHandle    _main_thread_group;             // Reference to the main thread group object
101   static OopHandle    _system_thread_group;           // Reference to the system thread group object
102 
103   static OopHandle    _the_empty_class_array;         // Canonicalized obj array of type java.lang.Class
104   static OopHandle    _the_null_string;               // A cache of "null" as a Java string
105   static OopHandle    _the_min_jint_string;           // A cache of "-2147483648" as a Java string
106 
107   static OopHandle    _the_null_sentinel;             // A unique object pointer unused except as a sentinel for null.
108 
109   // preallocated error objects (no backtrace)
110   static OopHandle    _out_of_memory_errors;
111 
112   // preallocated cause message for delayed StackOverflowError
113   static OopHandle    _delayed_stack_overflow_error_message;
114 
115   static LatestMethodCache* _finalizer_register_cache; // static method for registering finalizable objects
116   static LatestMethodCache* _loader_addClass_cache;    // method for registering loaded classes in class loader vector
117   static LatestMethodCache* _throw_illegal_access_error_cache; // Unsafe.throwIllegalAccessError() method
118   static LatestMethodCache* _throw_no_such_method_error_cache; // Unsafe.throwNoSuchMethodError() method
119   static LatestMethodCache* _do_stack_walk_cache;      // method for stack walker callback


120 
121   static Array<int>*            _the_empty_int_array;            // Canonicalized int array
122   static Array<u2>*             _the_empty_short_array;          // Canonicalized short array
123   static Array<Klass*>*         _the_empty_klass_array;          // Canonicalized klass array
124   static Array<InstanceKlass*>* _the_empty_instance_klass_array; // Canonicalized instance klass array


125   static Array<Method*>*        _the_empty_method_array;         // Canonicalized method array
126 
127   static Array<Klass*>*  _the_array_interfaces_array;
128 
129   // array of preallocated error objects with backtrace
130   static OopHandle     _preallocated_out_of_memory_error_array;
131 
132   // number of preallocated error objects available for use
133   static volatile jint _preallocated_out_of_memory_error_avail_count;
134 
135   static OopHandle    _null_ptr_exception_instance;   // preallocated exception object
136   static OopHandle    _arithmetic_exception_instance; // preallocated exception object
137   static OopHandle    _virtual_machine_error_instance; // preallocated exception object
138 
139   // References waiting to be transferred to the ReferenceHandler
140   static OopHandle    _reference_pending_list;
141 
142   // The particular choice of collected heap.
143   static CollectedHeap* _collectedHeap;
144 
145   static intptr_t _non_oop_bits;
146 

147   // array of dummy objects used with +FullGCAlot
148   debug_only(static OopHandle   _fullgc_alot_dummy_array;)
149   debug_only(static int         _fullgc_alot_dummy_next;)
150 
151   // Compiler/dispatch support
152   static int  _base_vtable_size;                      // Java vtbl size of klass Object (in words)
153 
154   // Initialization
155   static bool _bootstrapping;                         // true during genesis
156   static bool _module_initialized;                    // true after call_initPhase2 called
157   static bool _fully_initialized;                     // true after universe_init and initialize_vtables called
158 
159   // the array of preallocated errors with backtraces
160   static objArrayOop  preallocated_out_of_memory_errors();
161 
162   static objArrayOop out_of_memory_errors();
163   // generate an out of memory error; if possible using an error with preallocated backtrace;
164   // otherwise return the given default error.
165   static oop        gen_out_of_memory_error(oop default_err);
166 

237 
238   static objArrayOop  the_empty_class_array ();
239 
240   static oop          the_null_string();
241   static oop          the_min_jint_string();
242 
243   static oop          null_ptr_exception_instance();
244   static oop          arithmetic_exception_instance();
245   static oop          virtual_machine_error_instance();
246   static oop          vm_exception()                  { return virtual_machine_error_instance(); }
247 
248   static Array<Klass*>* the_array_interfaces_array()  { return _the_array_interfaces_array;   }
249   static Method*      finalizer_register_method()     { return _finalizer_register_cache->get_method(); }
250   static Method*      loader_addClass_method()        { return _loader_addClass_cache->get_method(); }
251 
252   static Method*      throw_illegal_access_error()    { return _throw_illegal_access_error_cache->get_method(); }
253   static Method*      throw_no_such_method_error()    { return _throw_no_such_method_error_cache->get_method(); }
254 
255   static Method*      do_stack_walk_method()          { return _do_stack_walk_cache->get_method(); }
256 



257   static oop          the_null_sentinel();
258   static address      the_null_sentinel_addr()        { return (address) &_the_null_sentinel;  }
259 
260   // Function to initialize these
261   static void initialize_known_methods(TRAPS);
262 
263   static void create_preallocated_out_of_memory_errors(TRAPS);
264 
265   // Reference pending list manipulation.  Access is protected by
266   // Heap_lock.  The getter, setter and predicate require the caller
267   // owns the lock.  Swap is used by parallel non-concurrent reference
268   // processing threads, where some higher level controller owns
269   // Heap_lock, so requires the lock is locked, but not necessarily by
270   // the current thread.
271   static oop          reference_pending_list();
272   static void         clear_reference_pending_list();
273   static bool         has_reference_pending_list();
274   static oop          swap_reference_pending_list(oop list);
275 
276   static Array<int>*             the_empty_int_array()    { return _the_empty_int_array; }
277   static Array<u2>*              the_empty_short_array()  { return _the_empty_short_array; }
278   static Array<Method*>*         the_empty_method_array() { return _the_empty_method_array; }
279   static Array<Klass*>*          the_empty_klass_array()  { return _the_empty_klass_array; }
280   static Array<InstanceKlass*>*  the_empty_instance_klass_array() { return _the_empty_instance_klass_array; }












281 
282   // OutOfMemoryError support. Returns an error with the required message. The returned error
283   // may or may not have a backtrace. If error has a backtrace then the stack trace is already
284   // filled in.
285   static oop out_of_memory_error_java_heap();
286   static oop out_of_memory_error_c_heap();
287   static oop out_of_memory_error_metaspace();
288   static oop out_of_memory_error_class_metaspace();
289   static oop out_of_memory_error_array_size();
290   static oop out_of_memory_error_gc_overhead_limit();
291   static oop out_of_memory_error_realloc_objects();
292 
293   // Throw default _out_of_memory_error_retry object as it will never propagate out of the VM
294   static oop out_of_memory_error_retry();
295   static oop delayed_stack_overflow_error_message();
296 
297   // The particular choice of collected heap.
298   static CollectedHeap* heap() { return _collectedHeap; }
299 
300   DEBUG_ONLY(static bool is_gc_active();)

100   static OopHandle    _main_thread_group;             // Reference to the main thread group object
101   static OopHandle    _system_thread_group;           // Reference to the system thread group object
102 
103   static OopHandle    _the_empty_class_array;         // Canonicalized obj array of type java.lang.Class
104   static OopHandle    _the_null_string;               // A cache of "null" as a Java string
105   static OopHandle    _the_min_jint_string;           // A cache of "-2147483648" as a Java string
106 
107   static OopHandle    _the_null_sentinel;             // A unique object pointer unused except as a sentinel for null.
108 
109   // preallocated error objects (no backtrace)
110   static OopHandle    _out_of_memory_errors;
111 
112   // preallocated cause message for delayed StackOverflowError
113   static OopHandle    _delayed_stack_overflow_error_message;
114 
115   static LatestMethodCache* _finalizer_register_cache; // static method for registering finalizable objects
116   static LatestMethodCache* _loader_addClass_cache;    // method for registering loaded classes in class loader vector
117   static LatestMethodCache* _throw_illegal_access_error_cache; // Unsafe.throwIllegalAccessError() method
118   static LatestMethodCache* _throw_no_such_method_error_cache; // Unsafe.throwNoSuchMethodError() method
119   static LatestMethodCache* _do_stack_walk_cache;      // method for stack walker callback
120   static LatestMethodCache* _is_substitutable_cache;   // PrimitiveObjectMethods.isSubstitutable() method
121   static LatestMethodCache* _primitive_type_hash_code_cache;  // PrimitiveObjectMethods.primitiveObjectHashCode() method
122 
123   static Array<int>*            _the_empty_int_array;            // Canonicalized int array
124   static Array<u2>*             _the_empty_short_array;          // Canonicalized short array
125   static Array<Klass*>*         _the_empty_klass_array;          // Canonicalized klass array
126   static Array<InstanceKlass*>* _the_empty_instance_klass_array; // Canonicalized instance klass array
127   static Array<InstanceKlass*>* _the_single_IdentityObject_klass_array;  // Common single interface array for IdentityObjects
128   static Array<InstanceKlass*>* _the_single_PrimitiveObject_klass_array; // Common single interface array for PrimitiveObjects
129   static Array<Method*>*        _the_empty_method_array;         // Canonicalized method array
130 
131   static Array<Klass*>*  _the_array_interfaces_array;
132 
133   // array of preallocated error objects with backtrace
134   static OopHandle     _preallocated_out_of_memory_error_array;
135 
136   // number of preallocated error objects available for use
137   static volatile jint _preallocated_out_of_memory_error_avail_count;
138 
139   static OopHandle    _null_ptr_exception_instance;   // preallocated exception object
140   static OopHandle    _arithmetic_exception_instance; // preallocated exception object
141   static OopHandle    _virtual_machine_error_instance; // preallocated exception object
142 
143   // References waiting to be transferred to the ReferenceHandler
144   static OopHandle    _reference_pending_list;
145 
146   // The particular choice of collected heap.
147   static CollectedHeap* _collectedHeap;
148 
149   static intptr_t _non_oop_bits;
150 
151 
152   // array of dummy objects used with +FullGCAlot
153   debug_only(static OopHandle   _fullgc_alot_dummy_array;)
154   debug_only(static int         _fullgc_alot_dummy_next;)
155 
156   // Compiler/dispatch support
157   static int  _base_vtable_size;                      // Java vtbl size of klass Object (in words)
158 
159   // Initialization
160   static bool _bootstrapping;                         // true during genesis
161   static bool _module_initialized;                    // true after call_initPhase2 called
162   static bool _fully_initialized;                     // true after universe_init and initialize_vtables called
163 
164   // the array of preallocated errors with backtraces
165   static objArrayOop  preallocated_out_of_memory_errors();
166 
167   static objArrayOop out_of_memory_errors();
168   // generate an out of memory error; if possible using an error with preallocated backtrace;
169   // otherwise return the given default error.
170   static oop        gen_out_of_memory_error(oop default_err);
171 

242 
243   static objArrayOop  the_empty_class_array ();
244 
245   static oop          the_null_string();
246   static oop          the_min_jint_string();
247 
248   static oop          null_ptr_exception_instance();
249   static oop          arithmetic_exception_instance();
250   static oop          virtual_machine_error_instance();
251   static oop          vm_exception()                  { return virtual_machine_error_instance(); }
252 
253   static Array<Klass*>* the_array_interfaces_array()  { return _the_array_interfaces_array;   }
254   static Method*      finalizer_register_method()     { return _finalizer_register_cache->get_method(); }
255   static Method*      loader_addClass_method()        { return _loader_addClass_cache->get_method(); }
256 
257   static Method*      throw_illegal_access_error()    { return _throw_illegal_access_error_cache->get_method(); }
258   static Method*      throw_no_such_method_error()    { return _throw_no_such_method_error_cache->get_method(); }
259 
260   static Method*      do_stack_walk_method()          { return _do_stack_walk_cache->get_method(); }
261 
262   static Method*      is_substitutable_method()       { return _is_substitutable_cache->get_method(); }
263   static Method*      primitive_type_hash_code_method()  { return _primitive_type_hash_code_cache->get_method(); }
264 
265   static oop          the_null_sentinel();
266   static address      the_null_sentinel_addr()        { return (address) &_the_null_sentinel;  }
267 
268   // Function to initialize these
269   static void initialize_known_methods(TRAPS);
270 
271   static void create_preallocated_out_of_memory_errors(TRAPS);
272 
273   // Reference pending list manipulation.  Access is protected by
274   // Heap_lock.  The getter, setter and predicate require the caller
275   // owns the lock.  Swap is used by parallel non-concurrent reference
276   // processing threads, where some higher level controller owns
277   // Heap_lock, so requires the lock is locked, but not necessarily by
278   // the current thread.
279   static oop          reference_pending_list();
280   static void         clear_reference_pending_list();
281   static bool         has_reference_pending_list();
282   static oop          swap_reference_pending_list(oop list);
283 
284   static Array<int>*             the_empty_int_array()    { return _the_empty_int_array; }
285   static Array<u2>*              the_empty_short_array()  { return _the_empty_short_array; }
286   static Array<Method*>*         the_empty_method_array() { return _the_empty_method_array; }
287   static Array<Klass*>*          the_empty_klass_array()  { return _the_empty_klass_array; }
288   static Array<InstanceKlass*>*  the_empty_instance_klass_array() { return _the_empty_instance_klass_array; }
289   static Array<InstanceKlass*>*  the_single_IdentityObject_klass_array() {
290     assert(_the_single_IdentityObject_klass_array != NULL, "Must be initialized before use");
291     assert(_the_single_IdentityObject_klass_array->length() == 1, "Sanity check");
292     return _the_single_IdentityObject_klass_array;
293   }
294   static void initialize_the_single_IdentityObject_klass_array(InstanceKlass* ik, TRAPS);
295   static Array<InstanceKlass*>*  the_single_PrimitiveObject_klass_array() {
296     assert(_the_single_PrimitiveObject_klass_array != NULL, "Must be initialized before use");
297     assert(_the_single_PrimitiveObject_klass_array->length() == 1, "Sanity check");
298     return _the_single_PrimitiveObject_klass_array;
299   }
300   static void initialize_the_single_PrimitiveObject_klass_array(InstanceKlass* ik, TRAPS);
301 
302   // OutOfMemoryError support. Returns an error with the required message. The returned error
303   // may or may not have a backtrace. If error has a backtrace then the stack trace is already
304   // filled in.
305   static oop out_of_memory_error_java_heap();
306   static oop out_of_memory_error_c_heap();
307   static oop out_of_memory_error_metaspace();
308   static oop out_of_memory_error_class_metaspace();
309   static oop out_of_memory_error_array_size();
310   static oop out_of_memory_error_gc_overhead_limit();
311   static oop out_of_memory_error_realloc_objects();
312 
313   // Throw default _out_of_memory_error_retry object as it will never propagate out of the VM
314   static oop out_of_memory_error_retry();
315   static oop delayed_stack_overflow_error_message();
316 
317   // The particular choice of collected heap.
318   static CollectedHeap* heap() { return _collectedHeap; }
319 
320   DEBUG_ONLY(static bool is_gc_active();)
< prev index next >