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 // preallocated message detail strings for error objects
136 static OopHandle _msg_metaspace;
137 static OopHandle _msg_class_metaspace;
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 // array of dummy objects used with +FullGCAlot
152 debug_only(static OopHandle _fullgc_alot_dummy_array;)
153 debug_only(static int _fullgc_alot_dummy_next;)
154
155 // Compiler/dispatch support
156 static int _base_vtable_size; // Java vtbl size of klass Object (in words)
157
158 // Initialization
159 static bool _bootstrapping; // true during genesis
160 static bool _module_initialized; // true after call_initPhase2 called
161 static bool _fully_initialized; // true after universe_init and initialize_vtables called
162
163 // the array of preallocated errors with backtraces
164 static objArrayOop preallocated_out_of_memory_errors();
165
166 static objArrayOop out_of_memory_errors();
167 // generate an out of memory error; if possible using an error with preallocated backtrace;
168 // otherwise return the given default error.
169 static oop gen_out_of_memory_error(oop default_err);
170
241
242 static objArrayOop the_empty_class_array ();
243
244 static oop the_null_string();
245 static oop the_min_jint_string();
246
247 static oop null_ptr_exception_instance();
248 static oop arithmetic_exception_instance();
249 static oop virtual_machine_error_instance();
250 static oop vm_exception() { return virtual_machine_error_instance(); }
251
252 static Array<Klass*>* the_array_interfaces_array() { return _the_array_interfaces_array; }
253 static Method* finalizer_register_method() { return _finalizer_register_cache->get_method(); }
254 static Method* loader_addClass_method() { return _loader_addClass_cache->get_method(); }
255
256 static Method* throw_illegal_access_error() { return _throw_illegal_access_error_cache->get_method(); }
257 static Method* throw_no_such_method_error() { return _throw_no_such_method_error_cache->get_method(); }
258
259 static Method* do_stack_walk_method() { return _do_stack_walk_cache->get_method(); }
260
261 static oop the_null_sentinel();
262 static address the_null_sentinel_addr() { return (address) &_the_null_sentinel; }
263
264 // Function to initialize these
265 static void initialize_known_methods(TRAPS);
266
267 static void create_preallocated_out_of_memory_errors(TRAPS);
268
269 // Reference pending list manipulation. Access is protected by
270 // Heap_lock. The getter, setter and predicate require the caller
271 // owns the lock. Swap is used by parallel non-concurrent reference
272 // processing threads, where some higher level controller owns
273 // Heap_lock, so requires the lock is locked, but not necessarily by
274 // the current thread.
275 static oop reference_pending_list();
276 static void clear_reference_pending_list();
277 static bool has_reference_pending_list();
278 static oop swap_reference_pending_list(oop list);
279
280 static Array<int>* the_empty_int_array() { return _the_empty_int_array; }
|
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<Method*>* _the_empty_method_array; // Canonicalized method array
128
129 static Array<Klass*>* _the_array_interfaces_array;
130
131 // array of preallocated error objects with backtrace
132 static OopHandle _preallocated_out_of_memory_error_array;
133
134 // number of preallocated error objects available for use
135 static volatile jint _preallocated_out_of_memory_error_avail_count;
136
137 // preallocated message detail strings for error objects
138 static OopHandle _msg_metaspace;
139 static OopHandle _msg_class_metaspace;
140
141 static OopHandle _null_ptr_exception_instance; // preallocated exception object
142 static OopHandle _arithmetic_exception_instance; // preallocated exception object
143 static OopHandle _virtual_machine_error_instance; // preallocated exception object
144
145 // References waiting to be transferred to the ReferenceHandler
146 static OopHandle _reference_pending_list;
147
148 // The particular choice of collected heap.
149 static CollectedHeap* _collectedHeap;
150
151 static intptr_t _non_oop_bits;
152
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
166 // the array of preallocated errors with backtraces
167 static objArrayOop preallocated_out_of_memory_errors();
168
169 static objArrayOop out_of_memory_errors();
170 // generate an out of memory error; if possible using an error with preallocated backtrace;
171 // otherwise return the given default error.
172 static oop gen_out_of_memory_error(oop default_err);
173
244
245 static objArrayOop the_empty_class_array ();
246
247 static oop the_null_string();
248 static oop the_min_jint_string();
249
250 static oop null_ptr_exception_instance();
251 static oop arithmetic_exception_instance();
252 static oop virtual_machine_error_instance();
253 static oop vm_exception() { return virtual_machine_error_instance(); }
254
255 static Array<Klass*>* the_array_interfaces_array() { return _the_array_interfaces_array; }
256 static Method* finalizer_register_method() { return _finalizer_register_cache->get_method(); }
257 static Method* loader_addClass_method() { return _loader_addClass_cache->get_method(); }
258
259 static Method* throw_illegal_access_error() { return _throw_illegal_access_error_cache->get_method(); }
260 static Method* throw_no_such_method_error() { return _throw_no_such_method_error_cache->get_method(); }
261
262 static Method* do_stack_walk_method() { return _do_stack_walk_cache->get_method(); }
263
264 static Method* is_substitutable_method() { return _is_substitutable_cache->get_method(); }
265 static Method* primitive_type_hash_code_method() { return _primitive_type_hash_code_cache->get_method(); }
266
267 static oop the_null_sentinel();
268 static address the_null_sentinel_addr() { return (address) &_the_null_sentinel; }
269
270 // Function to initialize these
271 static void initialize_known_methods(TRAPS);
272
273 static void create_preallocated_out_of_memory_errors(TRAPS);
274
275 // Reference pending list manipulation. Access is protected by
276 // Heap_lock. The getter, setter and predicate require the caller
277 // owns the lock. Swap is used by parallel non-concurrent reference
278 // processing threads, where some higher level controller owns
279 // Heap_lock, so requires the lock is locked, but not necessarily by
280 // the current thread.
281 static oop reference_pending_list();
282 static void clear_reference_pending_list();
283 static bool has_reference_pending_list();
284 static oop swap_reference_pending_list(oop list);
285
286 static Array<int>* the_empty_int_array() { return _the_empty_int_array; }
|