equal
deleted
inserted
replaced
123 // Parallel class loading check |
123 // Parallel class loading check |
124 |
124 |
125 bool SystemDictionary::is_parallelCapable(Handle class_loader) { |
125 bool SystemDictionary::is_parallelCapable(Handle class_loader) { |
126 if (UnsyncloadClass || class_loader.is_null()) return true; |
126 if (UnsyncloadClass || class_loader.is_null()) return true; |
127 if (AlwaysLockClassLoader) return false; |
127 if (AlwaysLockClassLoader) return false; |
128 return java_lang_Class::parallelCapable(class_loader()); |
128 return java_lang_ClassLoader::parallelCapable(class_loader()); |
129 } |
129 } |
130 // ---------------------------------------------------------------------------- |
130 // ---------------------------------------------------------------------------- |
131 // ParallelDefineClass flag does not apply to bootclass loader |
131 // ParallelDefineClass flag does not apply to bootclass loader |
132 bool SystemDictionary::is_parallelDefine(Handle class_loader) { |
132 bool SystemDictionary::is_parallelDefine(Handle class_loader) { |
133 if (class_loader.is_null()) return false; |
133 if (class_loader.is_null()) return false; |
134 if (AllowParallelDefineClass && java_lang_Class::parallelCapable(class_loader())) { |
134 if (AllowParallelDefineClass && java_lang_ClassLoader::parallelCapable(class_loader())) { |
135 return true; |
135 return true; |
136 } |
136 } |
137 return false; |
137 return false; |
138 } |
138 } |
139 // ---------------------------------------------------------------------------- |
139 // ---------------------------------------------------------------------------- |
1288 // first try to call this so it'd better be fast!! |
1288 // first try to call this so it'd better be fast!! |
1289 static instanceKlassHandle download_and_retry_class_load( |
1289 static instanceKlassHandle download_and_retry_class_load( |
1290 Symbol* class_name, |
1290 Symbol* class_name, |
1291 TRAPS) { |
1291 TRAPS) { |
1292 |
1292 |
1293 klassOop dlm = SystemDictionary::sun_jkernel_DownloadManager_klass(); |
1293 klassOop dlm = SystemDictionary::DownloadManager_klass(); |
1294 instanceKlassHandle nk; |
1294 instanceKlassHandle nk; |
1295 |
1295 |
1296 // If download manager class isn't loaded just return. |
1296 // If download manager class isn't loaded just return. |
1297 if (dlm == NULL) return nk; |
1297 if (dlm == NULL) return nk; |
1298 |
1298 |
1951 // Preload commonly used klasses |
1951 // Preload commonly used klasses |
1952 WKID scan = FIRST_WKID; |
1952 WKID scan = FIRST_WKID; |
1953 // first do Object, String, Class |
1953 // first do Object, String, Class |
1954 initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK); |
1954 initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK); |
1955 |
1955 |
1956 debug_only(instanceKlass::verify_class_klass_nonstatic_oop_maps(WK_KLASS(Class_klass))); |
1956 java_lang_Class::compute_offsets(); |
1957 |
1957 |
1958 // Fixup mirrors for classes loaded before java.lang.Class. |
1958 // Fixup mirrors for classes loaded before java.lang.Class. |
1959 // These calls iterate over the objects currently in the perm gen |
1959 // These calls iterate over the objects currently in the perm gen |
1960 // so calling them at this point is matters (not before when there |
1960 // so calling them at this point is matters (not before when there |
1961 // are fewer objects and not later after there are more objects |
1961 // are fewer objects and not later after there are more objects |
1999 _box_klasses[T_LONG] = WK_KLASS(Long_klass); |
1999 _box_klasses[T_LONG] = WK_KLASS(Long_klass); |
2000 //_box_klasses[T_OBJECT] = WK_KLASS(object_klass); |
2000 //_box_klasses[T_OBJECT] = WK_KLASS(object_klass); |
2001 //_box_klasses[T_ARRAY] = WK_KLASS(object_klass); |
2001 //_box_klasses[T_ARRAY] = WK_KLASS(object_klass); |
2002 |
2002 |
2003 #ifdef KERNEL |
2003 #ifdef KERNEL |
2004 if (sun_jkernel_DownloadManager_klass() == NULL) { |
2004 if (DownloadManager_klass() == NULL) { |
2005 warning("Cannot find sun/jkernel/DownloadManager"); |
2005 warning("Cannot find sun/jkernel/DownloadManager"); |
2006 } |
2006 } |
2007 #endif // KERNEL |
2007 #endif // KERNEL |
2008 |
2008 |
2009 { // Compute whether we should use loadClass or loadClassInternal when loading classes. |
2009 { // Compute whether we should use loadClass or loadClassInternal when loading classes. |
2734 class_size += ik->methods()->size(); |
2734 class_size += ik->methods()->size(); |
2735 class_size += ik->constants()->size(); |
2735 class_size += ik->constants()->size(); |
2736 class_size += ik->local_interfaces()->size(); |
2736 class_size += ik->local_interfaces()->size(); |
2737 class_size += ik->transitive_interfaces()->size(); |
2737 class_size += ik->transitive_interfaces()->size(); |
2738 // We do not have to count implementors, since we only store one! |
2738 // We do not have to count implementors, since we only store one! |
2739 class_size += ik->fields()->size(); |
2739 class_size += ik->all_fields_count() * FieldInfo::field_slots; |
2740 } |
2740 } |
2741 } |
2741 } |
2742 |
2742 |
2743 static void do_method(methodOop m) { |
2743 static void do_method(methodOop m) { |
2744 nmethods++; |
2744 nmethods++; |