168 static Array<Klass*>* _the_empty_klass_array; // Canonicalized klass obj array
169 static Array<Method*>* _the_empty_method_array; // Canonicalized method obj array
170
171 static Array<Klass*>* _the_array_interfaces_array;
172
173 // array of preallocated error objects with backtrace
174 static objArrayOop _preallocated_out_of_memory_error_array;
175
176 // number of preallocated error objects available for use
177 static volatile jint _preallocated_out_of_memory_error_avail_count;
178
179 static oop _null_ptr_exception_instance; // preallocated exception object
180 static oop _arithmetic_exception_instance; // preallocated exception object
181 static oop _virtual_machine_error_instance; // preallocated exception object
182 // The object used as an exception dummy when exceptions are thrown for
183 // the vm thread.
184 static oop _vm_exception;
185
186 static oop _allocation_context_notification_obj;
187
188 // The particular choice of collected heap.
189 static CollectedHeap* _collectedHeap;
190
191 static intptr_t _non_oop_bits;
192
193 // For UseCompressedOops.
194 static struct NarrowPtrStruct _narrow_oop;
195 // For UseCompressedClassPointers.
196 static struct NarrowPtrStruct _narrow_klass;
197 static address _narrow_ptrs_base;
198
199 // array of dummy objects used with +FullGCAlot
200 debug_only(static objArrayOop _fullgc_alot_dummy_array;)
201 // index of next entry to clear
202 debug_only(static int _fullgc_alot_dummy_next;)
203
204 // Compiler/dispatch support
205 static int _base_vtable_size; // Java vtbl size of klass Object (in words)
206
207 // Initialization
316 static oop the_min_jint_string() { return _the_min_jint_string; }
317
318 static Method* finalizer_register_method() { return _finalizer_register_cache->get_method(); }
319 static Method* loader_addClass_method() { return _loader_addClass_cache->get_method(); }
320
321 static Method* protection_domain_implies_method() { return _pd_implies_cache->get_method(); }
322 static Method* throw_illegal_access_error() { return _throw_illegal_access_error_cache->get_method(); }
323
324 static Method* do_stack_walk_method() { return _do_stack_walk_cache->get_method(); }
325
326 // Function to initialize these
327 static void initialize_known_methods(TRAPS);
328
329 static oop null_ptr_exception_instance() { return _null_ptr_exception_instance; }
330 static oop arithmetic_exception_instance() { return _arithmetic_exception_instance; }
331 static oop virtual_machine_error_instance() { return _virtual_machine_error_instance; }
332 static oop vm_exception() { return _vm_exception; }
333
334 static inline oop allocation_context_notification_obj();
335 static inline void set_allocation_context_notification_obj(oop obj);
336
337 static Array<int>* the_empty_int_array() { return _the_empty_int_array; }
338 static Array<u2>* the_empty_short_array() { return _the_empty_short_array; }
339 static Array<Method*>* the_empty_method_array() { return _the_empty_method_array; }
340 static Array<Klass*>* the_empty_klass_array() { return _the_empty_klass_array; }
341
342 // OutOfMemoryError support. Returns an error with the required message. The returned error
343 // may or may not have a backtrace. If error has a backtrace then the stack trace is already
344 // filled in.
345 static oop out_of_memory_error_java_heap() { return gen_out_of_memory_error(_out_of_memory_error_java_heap); }
346 static oop out_of_memory_error_metaspace() { return gen_out_of_memory_error(_out_of_memory_error_metaspace); }
347 static oop out_of_memory_error_class_metaspace() { return gen_out_of_memory_error(_out_of_memory_error_class_metaspace); }
348 static oop out_of_memory_error_array_size() { return gen_out_of_memory_error(_out_of_memory_error_array_size); }
349 static oop out_of_memory_error_gc_overhead_limit() { return gen_out_of_memory_error(_out_of_memory_error_gc_overhead_limit); }
350 static oop out_of_memory_error_realloc_objects() { return gen_out_of_memory_error(_out_of_memory_error_realloc_objects); }
351 static oop delayed_stack_overflow_error_message() { return _delayed_stack_overflow_error_message; }
352
353 // Accessors needed for fast allocation
354 static Klass** boolArrayKlassObj_addr() { return &_boolArrayKlassObj; }
355 static Klass** byteArrayKlassObj_addr() { return &_byteArrayKlassObj; }
|
168 static Array<Klass*>* _the_empty_klass_array; // Canonicalized klass obj array
169 static Array<Method*>* _the_empty_method_array; // Canonicalized method obj array
170
171 static Array<Klass*>* _the_array_interfaces_array;
172
173 // array of preallocated error objects with backtrace
174 static objArrayOop _preallocated_out_of_memory_error_array;
175
176 // number of preallocated error objects available for use
177 static volatile jint _preallocated_out_of_memory_error_avail_count;
178
179 static oop _null_ptr_exception_instance; // preallocated exception object
180 static oop _arithmetic_exception_instance; // preallocated exception object
181 static oop _virtual_machine_error_instance; // preallocated exception object
182 // The object used as an exception dummy when exceptions are thrown for
183 // the vm thread.
184 static oop _vm_exception;
185
186 static oop _allocation_context_notification_obj;
187
188 // References waiting to be transferred to the ReferenceHandler
189 static oop _reference_pending_list;
190
191 // The particular choice of collected heap.
192 static CollectedHeap* _collectedHeap;
193
194 static intptr_t _non_oop_bits;
195
196 // For UseCompressedOops.
197 static struct NarrowPtrStruct _narrow_oop;
198 // For UseCompressedClassPointers.
199 static struct NarrowPtrStruct _narrow_klass;
200 static address _narrow_ptrs_base;
201
202 // array of dummy objects used with +FullGCAlot
203 debug_only(static objArrayOop _fullgc_alot_dummy_array;)
204 // index of next entry to clear
205 debug_only(static int _fullgc_alot_dummy_next;)
206
207 // Compiler/dispatch support
208 static int _base_vtable_size; // Java vtbl size of klass Object (in words)
209
210 // Initialization
319 static oop the_min_jint_string() { return _the_min_jint_string; }
320
321 static Method* finalizer_register_method() { return _finalizer_register_cache->get_method(); }
322 static Method* loader_addClass_method() { return _loader_addClass_cache->get_method(); }
323
324 static Method* protection_domain_implies_method() { return _pd_implies_cache->get_method(); }
325 static Method* throw_illegal_access_error() { return _throw_illegal_access_error_cache->get_method(); }
326
327 static Method* do_stack_walk_method() { return _do_stack_walk_cache->get_method(); }
328
329 // Function to initialize these
330 static void initialize_known_methods(TRAPS);
331
332 static oop null_ptr_exception_instance() { return _null_ptr_exception_instance; }
333 static oop arithmetic_exception_instance() { return _arithmetic_exception_instance; }
334 static oop virtual_machine_error_instance() { return _virtual_machine_error_instance; }
335 static oop vm_exception() { return _vm_exception; }
336
337 static inline oop allocation_context_notification_obj();
338 static inline void set_allocation_context_notification_obj(oop obj);
339
340 // Reference pending list manipulation. Access is protected by
341 // Heap_lock. The getter, setter and predicate require the caller
342 // owns the lock. Swap is used by parallel non-concurrent reference
343 // processing threads, where some higher level controller owns
344 // Heap_lock, so requires the lock is locked, but not necessarily by
345 // the current thread.
346 static oop reference_pending_list();
347 static void set_reference_pending_list(oop list);
348 static bool has_reference_pending_list();
349 static oop swap_reference_pending_list(oop list);
350
351 static Array<int>* the_empty_int_array() { return _the_empty_int_array; }
352 static Array<u2>* the_empty_short_array() { return _the_empty_short_array; }
353 static Array<Method*>* the_empty_method_array() { return _the_empty_method_array; }
354 static Array<Klass*>* the_empty_klass_array() { return _the_empty_klass_array; }
355
356 // OutOfMemoryError support. Returns an error with the required message. The returned error
357 // may or may not have a backtrace. If error has a backtrace then the stack trace is already
358 // filled in.
359 static oop out_of_memory_error_java_heap() { return gen_out_of_memory_error(_out_of_memory_error_java_heap); }
360 static oop out_of_memory_error_metaspace() { return gen_out_of_memory_error(_out_of_memory_error_metaspace); }
361 static oop out_of_memory_error_class_metaspace() { return gen_out_of_memory_error(_out_of_memory_error_class_metaspace); }
362 static oop out_of_memory_error_array_size() { return gen_out_of_memory_error(_out_of_memory_error_array_size); }
363 static oop out_of_memory_error_gc_overhead_limit() { return gen_out_of_memory_error(_out_of_memory_error_gc_overhead_limit); }
364 static oop out_of_memory_error_realloc_objects() { return gen_out_of_memory_error(_out_of_memory_error_realloc_objects); }
365 static oop delayed_stack_overflow_error_message() { return _delayed_stack_overflow_error_message; }
366
367 // Accessors needed for fast allocation
368 static Klass** boolArrayKlassObj_addr() { return &_boolArrayKlassObj; }
369 static Klass** byteArrayKlassObj_addr() { return &_byteArrayKlassObj; }
|