< prev index next >

src/hotspot/share/memory/universe.cpp

Print this page

 365     ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
 366     assert(k->super() == ok, "u3");
 367     if (k->is_instance_klass()) {
 368       InstanceKlass::cast(k)->restore_unshareable_info(loader_data, Handle(), nullptr, CHECK);
 369     } else {
 370       ArrayKlass::cast(k)->restore_unshareable_info(loader_data, Handle(), CHECK);
 371     }
 372   } else
 373 #endif
 374   {
 375     k->initialize_supers(ok, nullptr, CHECK);
 376   }
 377   k->append_to_sibling_list();
 378 }
 379 
 380 void Universe::genesis(TRAPS) {
 381   ResourceMark rm(THREAD);
 382   HandleMark   hm(THREAD);
 383 
 384   // Explicit null checks are needed if these offsets are not smaller than the page size
 385   assert(oopDesc::klass_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 386          "Klass offset is expected to be less than the page size");





 387   assert(arrayOopDesc::length_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 388          "Array length offset is expected to be less than the page size");
 389 
 390   { AutoModifyRestore<bool> temporarily(_bootstrapping, true);
 391 
 392     java_lang_Class::allocate_fixup_lists();
 393 
 394     // determine base vtable size; without that we cannot create the array klasses
 395     compute_base_vtable_size();
 396 
 397     if (!CDSConfig::is_using_archive()) {
 398       // Initialization of the fillerArrayKlass must come before regular
 399       // int-TypeArrayKlass so that the int-Array mirror points to the
 400       // int-TypeArrayKlass.
 401       _fillerArrayKlass = TypeArrayKlass::create_klass(T_INT, "[Ljdk/internal/vm/FillerElement;", CHECK);
 402       for (int i = T_BOOLEAN; i < T_LONG+1; i++) {
 403         _typeArrayKlasses[i] = TypeArrayKlass::create_klass((BasicType)i, CHECK);
 404       }
 405 
 406       ClassLoaderData* null_cld = ClassLoaderData::the_null_class_loader_data();

 365     ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
 366     assert(k->super() == ok, "u3");
 367     if (k->is_instance_klass()) {
 368       InstanceKlass::cast(k)->restore_unshareable_info(loader_data, Handle(), nullptr, CHECK);
 369     } else {
 370       ArrayKlass::cast(k)->restore_unshareable_info(loader_data, Handle(), CHECK);
 371     }
 372   } else
 373 #endif
 374   {
 375     k->initialize_supers(ok, nullptr, CHECK);
 376   }
 377   k->append_to_sibling_list();
 378 }
 379 
 380 void Universe::genesis(TRAPS) {
 381   ResourceMark rm(THREAD);
 382   HandleMark   hm(THREAD);
 383 
 384   // Explicit null checks are needed if these offsets are not smaller than the page size
 385   if (UseCompactObjectHeaders) {
 386     assert(oopDesc::mark_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 387            "Mark offset is expected to be less than the page size");
 388   } else {
 389     assert(oopDesc::klass_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 390            "Klass offset is expected to be less than the page size");
 391   }
 392   assert(arrayOopDesc::length_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 393          "Array length offset is expected to be less than the page size");
 394 
 395   { AutoModifyRestore<bool> temporarily(_bootstrapping, true);
 396 
 397     java_lang_Class::allocate_fixup_lists();
 398 
 399     // determine base vtable size; without that we cannot create the array klasses
 400     compute_base_vtable_size();
 401 
 402     if (!CDSConfig::is_using_archive()) {
 403       // Initialization of the fillerArrayKlass must come before regular
 404       // int-TypeArrayKlass so that the int-Array mirror points to the
 405       // int-TypeArrayKlass.
 406       _fillerArrayKlass = TypeArrayKlass::create_klass(T_INT, "[Ljdk/internal/vm/FillerElement;", CHECK);
 407       for (int i = T_BOOLEAN; i < T_LONG+1; i++) {
 408         _typeArrayKlasses[i] = TypeArrayKlass::create_klass((BasicType)i, CHECK);
 409       }
 410 
 411       ClassLoaderData* null_cld = ClassLoaderData::the_null_class_loader_data();
< prev index next >