115 objArrayOop Universe::_the_empty_class_klass_array = NULL; |
115 objArrayOop Universe::_the_empty_class_klass_array = NULL; |
116 Array<Klass*>* Universe::_the_array_interfaces_array = NULL; |
116 Array<Klass*>* Universe::_the_array_interfaces_array = NULL; |
117 oop Universe::_the_null_string = NULL; |
117 oop Universe::_the_null_string = NULL; |
118 oop Universe::_the_min_jint_string = NULL; |
118 oop Universe::_the_min_jint_string = NULL; |
119 LatestMethodOopCache* Universe::_finalizer_register_cache = NULL; |
119 LatestMethodOopCache* Universe::_finalizer_register_cache = NULL; |
|
120 LatestMethodOopCache* Universe::_loader_addClass_cache = NULL; |
120 ActiveMethodOopsCache* Universe::_reflect_invoke_cache = NULL; |
121 ActiveMethodOopsCache* Universe::_reflect_invoke_cache = NULL; |
121 oop Universe::_out_of_memory_error_java_heap = NULL; |
122 oop Universe::_out_of_memory_error_java_heap = NULL; |
122 oop Universe::_out_of_memory_error_perm_gen = NULL; |
123 oop Universe::_out_of_memory_error_perm_gen = NULL; |
123 oop Universe::_out_of_memory_error_array_size = NULL; |
124 oop Universe::_out_of_memory_error_array_size = NULL; |
124 oop Universe::_out_of_memory_error_gc_overhead_limit = NULL; |
125 oop Universe::_out_of_memory_error_gc_overhead_limit = NULL; |
226 f->do_ptr((void**)&_the_empty_int_array); |
227 f->do_ptr((void**)&_the_empty_int_array); |
227 f->do_ptr((void**)&_the_empty_short_array); |
228 f->do_ptr((void**)&_the_empty_short_array); |
228 f->do_ptr((void**)&_the_empty_method_array); |
229 f->do_ptr((void**)&_the_empty_method_array); |
229 f->do_ptr((void**)&_the_empty_klass_array); |
230 f->do_ptr((void**)&_the_empty_klass_array); |
230 _finalizer_register_cache->serialize(f); |
231 _finalizer_register_cache->serialize(f); |
|
232 _loader_addClass_cache->serialize(f); |
231 _reflect_invoke_cache->serialize(f); |
233 _reflect_invoke_cache->serialize(f); |
232 } |
234 } |
233 |
235 |
234 void Universe::check_alignment(uintx size, uintx alignment, const char* name) { |
236 void Universe::check_alignment(uintx size, uintx alignment, const char* name) { |
235 if (size < alignment || size % alignment != 0) { |
237 if (size < alignment || size % alignment != 0) { |
650 ClassLoaderData::init_null_class_loader_data(); |
652 ClassLoaderData::init_null_class_loader_data(); |
651 |
653 |
652 // We have a heap so create the Method* caches before |
654 // We have a heap so create the Method* caches before |
653 // Metaspace::initialize_shared_spaces() tries to populate them. |
655 // Metaspace::initialize_shared_spaces() tries to populate them. |
654 Universe::_finalizer_register_cache = new LatestMethodOopCache(); |
656 Universe::_finalizer_register_cache = new LatestMethodOopCache(); |
|
657 Universe::_loader_addClass_cache = new LatestMethodOopCache(); |
655 Universe::_reflect_invoke_cache = new ActiveMethodOopsCache(); |
658 Universe::_reflect_invoke_cache = new ActiveMethodOopsCache(); |
656 |
659 |
657 if (UseSharedSpaces) { |
660 if (UseSharedSpaces) { |
658 // Read the data structures supporting the shared spaces (shared |
661 // Read the data structures supporting the shared spaces (shared |
659 // system dictionary, symbol table, etc.). After that, access to |
662 // system dictionary, symbol table, etc.). After that, access to |
1039 THROW_MSG_(vmSymbols::java_lang_NoSuchMethodException(), |
1042 THROW_MSG_(vmSymbols::java_lang_NoSuchMethodException(), |
1040 "java.lang.reflect.Method.invoke", false); |
1043 "java.lang.reflect.Method.invoke", false); |
1041 } |
1044 } |
1042 Universe::_reflect_invoke_cache->init(k_h(), m, CHECK_false); |
1045 Universe::_reflect_invoke_cache->init(k_h(), m, CHECK_false); |
1043 |
1046 |
|
1047 // Setup method for registering loaded classes in class loader vector |
|
1048 InstanceKlass::cast(SystemDictionary::ClassLoader_klass())->link_class(CHECK_false); |
|
1049 m = InstanceKlass::cast(SystemDictionary::ClassLoader_klass())->find_method(vmSymbols::addClass_name(), vmSymbols::class_void_signature()); |
|
1050 if (m == NULL || m->is_static()) { |
|
1051 THROW_MSG_(vmSymbols::java_lang_NoSuchMethodException(), |
|
1052 "java.lang.ClassLoader.addClass", false); |
|
1053 } |
|
1054 Universe::_loader_addClass_cache->init( |
|
1055 SystemDictionary::ClassLoader_klass(), m, CHECK_false); |
|
1056 |
1044 // The folowing is initializing converter functions for serialization in |
1057 // The folowing is initializing converter functions for serialization in |
1045 // JVM.cpp. If we clean up the StrictMath code above we may want to find |
1058 // JVM.cpp. If we clean up the StrictMath code above we may want to find |
1046 // a better solution for this as well. |
1059 // a better solution for this as well. |
1047 initialize_converter_functions(); |
1060 initialize_converter_functions(); |
1048 |
1061 |