332 333 // OLD 334 // Initialize _objectArrayKlass after core bootstraping to make 335 // sure the super class is set up properly for _objectArrayKlass. 336 // --- 337 // NEW 338 // Since some of the old system object arrays have been converted to 339 // ordinary object arrays, _objectArrayKlass will be loaded when 340 // SystemDictionary::initialize(CHECK); is run. See the extra check 341 // for Object_klass_loaded in objArrayKlassKlass::allocate_objArray_klass_impl. 342 _objectArrayKlassObj = InstanceKlass:: 343 cast(SystemDictionary::Object_klass())->array_klass(1, CHECK); 344 // OLD 345 // Add the class to the class hierarchy manually to make sure that 346 // its vtable is initialized after core bootstrapping is completed. 347 // --- 348 // New 349 // Have already been initialized. 350 _objectArrayKlassObj->append_to_sibling_list(); 351 352 // Compute is_jdk version flags. 353 // Only 1.3 or later has the java.lang.Shutdown class. 354 // Only 1.4 or later has the java.lang.CharSequence interface. 355 // Only 1.5 or later has the java.lang.management.MemoryUsage class. 356 if (JDK_Version::is_partially_initialized()) { 357 uint8_t jdk_version; 358 Klass* k = SystemDictionary::resolve_or_null( 359 vmSymbols::java_lang_management_MemoryUsage(), THREAD); 360 CLEAR_PENDING_EXCEPTION; // ignore exceptions 361 if (k == NULL) { 362 k = SystemDictionary::resolve_or_null( 363 vmSymbols::java_lang_CharSequence(), THREAD); 364 CLEAR_PENDING_EXCEPTION; // ignore exceptions 365 if (k == NULL) { 366 k = SystemDictionary::resolve_or_null( 367 vmSymbols::java_lang_Shutdown(), THREAD); 368 CLEAR_PENDING_EXCEPTION; // ignore exceptions 369 if (k == NULL) { 370 jdk_version = 2; 371 } else { 372 jdk_version = 3; 373 } 374 } else { 375 jdk_version = 4; 376 } 377 } else { 378 jdk_version = 5; 379 } 380 JDK_Version::fully_initialize(jdk_version); 381 } 382 383 #ifdef ASSERT 384 if (FullGCALot) { 385 // Allocate an array of dummy objects. 386 // We'd like these to be at the bottom of the old generation, 387 // so that when we free one and then collect, 388 // (almost) the whole heap moves 389 // and we find out if we actually update all the oops correctly. 390 // But we can't allocate directly in the old generation, 391 // so we allocate wherever, and hope that the first collection 392 // moves these objects to the bottom of the old generation. 393 // We can allocate directly in the permanent generation, so we do. 394 int size; 395 if (UseConcMarkSweepGC) { 396 warning("Using +FullGCALot with concurrent mark sweep gc " 397 "will not force all objects to relocate"); 398 size = FullGCALotDummies; 399 } else { 400 size = FullGCALotDummies * 2; 401 } 402 objArrayOop naked_array = oopFactory::new_objArray(SystemDictionary::Object_klass(), size, CHECK); | 332 333 // OLD 334 // Initialize _objectArrayKlass after core bootstraping to make 335 // sure the super class is set up properly for _objectArrayKlass. 336 // --- 337 // NEW 338 // Since some of the old system object arrays have been converted to 339 // ordinary object arrays, _objectArrayKlass will be loaded when 340 // SystemDictionary::initialize(CHECK); is run. See the extra check 341 // for Object_klass_loaded in objArrayKlassKlass::allocate_objArray_klass_impl. 342 _objectArrayKlassObj = InstanceKlass:: 343 cast(SystemDictionary::Object_klass())->array_klass(1, CHECK); 344 // OLD 345 // Add the class to the class hierarchy manually to make sure that 346 // its vtable is initialized after core bootstrapping is completed. 347 // --- 348 // New 349 // Have already been initialized. 350 _objectArrayKlassObj->append_to_sibling_list(); 351 352 #ifdef ASSERT 353 if (FullGCALot) { 354 // Allocate an array of dummy objects. 355 // We'd like these to be at the bottom of the old generation, 356 // so that when we free one and then collect, 357 // (almost) the whole heap moves 358 // and we find out if we actually update all the oops correctly. 359 // But we can't allocate directly in the old generation, 360 // so we allocate wherever, and hope that the first collection 361 // moves these objects to the bottom of the old generation. 362 // We can allocate directly in the permanent generation, so we do. 363 int size; 364 if (UseConcMarkSweepGC) { 365 warning("Using +FullGCALot with concurrent mark sweep gc " 366 "will not force all objects to relocate"); 367 size = FullGCALotDummies; 368 } else { 369 size = FullGCALotDummies * 2; 370 } 371 objArrayOop naked_array = oopFactory::new_objArray(SystemDictionary::Object_klass(), size, CHECK); |