105 oop Universe::_the_null_string = NULL; |
105 oop Universe::_the_null_string = NULL; |
106 oop Universe::_the_min_jint_string = NULL; |
106 oop Universe::_the_min_jint_string = NULL; |
107 LatestMethodCache* Universe::_finalizer_register_cache = NULL; |
107 LatestMethodCache* Universe::_finalizer_register_cache = NULL; |
108 LatestMethodCache* Universe::_loader_addClass_cache = NULL; |
108 LatestMethodCache* Universe::_loader_addClass_cache = NULL; |
109 LatestMethodCache* Universe::_throw_illegal_access_error_cache = NULL; |
109 LatestMethodCache* Universe::_throw_illegal_access_error_cache = NULL; |
|
110 LatestMethodCache* Universe::_throw_no_such_method_error_cache = NULL; |
110 LatestMethodCache* Universe::_do_stack_walk_cache = NULL; |
111 LatestMethodCache* Universe::_do_stack_walk_cache = NULL; |
111 oop Universe::_out_of_memory_error_java_heap = NULL; |
112 oop Universe::_out_of_memory_error_java_heap = NULL; |
112 oop Universe::_out_of_memory_error_metaspace = NULL; |
113 oop Universe::_out_of_memory_error_metaspace = NULL; |
113 oop Universe::_out_of_memory_error_class_metaspace = NULL; |
114 oop Universe::_out_of_memory_error_class_metaspace = NULL; |
114 oop Universe::_out_of_memory_error_array_size = NULL; |
115 oop Universe::_out_of_memory_error_array_size = NULL; |
228 it->push(&_the_array_interfaces_array); |
229 it->push(&_the_array_interfaces_array); |
229 |
230 |
230 _finalizer_register_cache->metaspace_pointers_do(it); |
231 _finalizer_register_cache->metaspace_pointers_do(it); |
231 _loader_addClass_cache->metaspace_pointers_do(it); |
232 _loader_addClass_cache->metaspace_pointers_do(it); |
232 _throw_illegal_access_error_cache->metaspace_pointers_do(it); |
233 _throw_illegal_access_error_cache->metaspace_pointers_do(it); |
|
234 _throw_no_such_method_error_cache->metaspace_pointers_do(it); |
233 _do_stack_walk_cache->metaspace_pointers_do(it); |
235 _do_stack_walk_cache->metaspace_pointers_do(it); |
234 } |
236 } |
235 |
237 |
236 // Serialize metadata and pointers to primitive type mirrors in and out of CDS archive |
238 // Serialize metadata and pointers to primitive type mirrors in and out of CDS archive |
237 void Universe::serialize(SerializeClosure* f) { |
239 void Universe::serialize(SerializeClosure* f) { |
269 f->do_ptr((void**)&_the_empty_klass_array); |
271 f->do_ptr((void**)&_the_empty_klass_array); |
270 f->do_ptr((void**)&_the_empty_instance_klass_array); |
272 f->do_ptr((void**)&_the_empty_instance_klass_array); |
271 _finalizer_register_cache->serialize(f); |
273 _finalizer_register_cache->serialize(f); |
272 _loader_addClass_cache->serialize(f); |
274 _loader_addClass_cache->serialize(f); |
273 _throw_illegal_access_error_cache->serialize(f); |
275 _throw_illegal_access_error_cache->serialize(f); |
|
276 _throw_no_such_method_error_cache->serialize(f); |
274 _do_stack_walk_cache->serialize(f); |
277 _do_stack_walk_cache->serialize(f); |
275 } |
278 } |
276 |
279 |
277 void Universe::check_alignment(uintx size, uintx alignment, const char* name) { |
280 void Universe::check_alignment(uintx size, uintx alignment, const char* name) { |
278 if (size < alignment || size % alignment != 0) { |
281 if (size < alignment || size % alignment != 0) { |
687 // We have a heap so create the Method* caches before |
690 // We have a heap so create the Method* caches before |
688 // Metaspace::initialize_shared_spaces() tries to populate them. |
691 // Metaspace::initialize_shared_spaces() tries to populate them. |
689 Universe::_finalizer_register_cache = new LatestMethodCache(); |
692 Universe::_finalizer_register_cache = new LatestMethodCache(); |
690 Universe::_loader_addClass_cache = new LatestMethodCache(); |
693 Universe::_loader_addClass_cache = new LatestMethodCache(); |
691 Universe::_throw_illegal_access_error_cache = new LatestMethodCache(); |
694 Universe::_throw_illegal_access_error_cache = new LatestMethodCache(); |
|
695 Universe::_throw_no_such_method_error_cache = new LatestMethodCache(); |
692 Universe::_do_stack_walk_cache = new LatestMethodCache(); |
696 Universe::_do_stack_walk_cache = new LatestMethodCache(); |
693 |
697 |
694 #if INCLUDE_CDS |
698 #if INCLUDE_CDS |
695 if (UseSharedSpaces) { |
699 if (UseSharedSpaces) { |
696 // Read the data structures supporting the shared spaces (shared |
700 // Read the data structures supporting the shared spaces (shared |
931 vmSymbols::object_void_signature(), true, CHECK); |
935 vmSymbols::object_void_signature(), true, CHECK); |
932 |
936 |
933 initialize_known_method(_throw_illegal_access_error_cache, |
937 initialize_known_method(_throw_illegal_access_error_cache, |
934 SystemDictionary::internal_Unsafe_klass(), |
938 SystemDictionary::internal_Unsafe_klass(), |
935 "throwIllegalAccessError", |
939 "throwIllegalAccessError", |
|
940 vmSymbols::void_method_signature(), true, CHECK); |
|
941 |
|
942 initialize_known_method(_throw_no_such_method_error_cache, |
|
943 SystemDictionary::internal_Unsafe_klass(), |
|
944 "throwNoSuchMethodError", |
936 vmSymbols::void_method_signature(), true, CHECK); |
945 vmSymbols::void_method_signature(), true, CHECK); |
937 |
946 |
938 // Set up method for registering loaded classes in class loader vector |
947 // Set up method for registering loaded classes in class loader vector |
939 initialize_known_method(_loader_addClass_cache, |
948 initialize_known_method(_loader_addClass_cache, |
940 SystemDictionary::ClassLoader_klass(), |
949 SystemDictionary::ClassLoader_klass(), |