< prev index next >

src/hotspot/share/memory/universe.cpp

Print this page

 305     ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
 306     assert(k->super() == ok, "u3");
 307     if (k->is_instance_klass()) {
 308       InstanceKlass::cast(k)->restore_unshareable_info(loader_data, Handle(), nullptr, CHECK);
 309     } else {
 310       ArrayKlass::cast(k)->restore_unshareable_info(loader_data, Handle(), CHECK);
 311     }
 312   } else
 313 #endif
 314   {
 315     k->initialize_supers(ok, nullptr, CHECK);
 316   }
 317   k->append_to_sibling_list();
 318 }
 319 
 320 void Universe::genesis(TRAPS) {
 321   ResourceMark rm(THREAD);
 322   HandleMark   hm(THREAD);
 323 
 324   // Explicit null checks are needed if these offsets are not smaller than the page size
 325   assert(oopDesc::klass_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 326          "Klass offset is expected to be less than the page size");





 327   assert(arrayOopDesc::length_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 328          "Array length offset is expected to be less than the page size");
 329 
 330   { AutoModifyRestore<bool> temporarily(_bootstrapping, true);
 331 
 332     java_lang_Class::allocate_fixup_lists();
 333 
 334     // determine base vtable size; without that we cannot create the array klasses
 335     compute_base_vtable_size();
 336 
 337     if (!UseSharedSpaces) {
 338       // Initialization of the fillerArrayKlass must come before regular
 339       // int-TypeArrayKlass so that the int-Array mirror points to the
 340       // int-TypeArrayKlass.
 341       _fillerArrayKlassObj = TypeArrayKlass::create_klass(T_INT, "[Ljdk/internal/vm/FillerElement;", CHECK);
 342       for (int i = T_BOOLEAN; i < T_LONG+1; i++) {
 343         _typeArrayKlassObjs[i] = TypeArrayKlass::create_klass((BasicType)i, CHECK);
 344       }
 345 
 346       ClassLoaderData* null_cld = ClassLoaderData::the_null_class_loader_data();

 305     ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
 306     assert(k->super() == ok, "u3");
 307     if (k->is_instance_klass()) {
 308       InstanceKlass::cast(k)->restore_unshareable_info(loader_data, Handle(), nullptr, CHECK);
 309     } else {
 310       ArrayKlass::cast(k)->restore_unshareable_info(loader_data, Handle(), CHECK);
 311     }
 312   } else
 313 #endif
 314   {
 315     k->initialize_supers(ok, nullptr, CHECK);
 316   }
 317   k->append_to_sibling_list();
 318 }
 319 
 320 void Universe::genesis(TRAPS) {
 321   ResourceMark rm(THREAD);
 322   HandleMark   hm(THREAD);
 323 
 324   // Explicit null checks are needed if these offsets are not smaller than the page size
 325   if (UseCompactObjectHeaders) {
 326     assert(oopDesc::mark_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 327            "Mark offset is expected to be less than the page size");
 328   } else {
 329     assert(oopDesc::klass_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 330            "Klass offset is expected to be less than the page size");
 331   }
 332   assert(arrayOopDesc::length_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 333          "Array length offset is expected to be less than the page size");
 334 
 335   { AutoModifyRestore<bool> temporarily(_bootstrapping, true);
 336 
 337     java_lang_Class::allocate_fixup_lists();
 338 
 339     // determine base vtable size; without that we cannot create the array klasses
 340     compute_base_vtable_size();
 341 
 342     if (!UseSharedSpaces) {
 343       // Initialization of the fillerArrayKlass must come before regular
 344       // int-TypeArrayKlass so that the int-Array mirror points to the
 345       // int-TypeArrayKlass.
 346       _fillerArrayKlassObj = TypeArrayKlass::create_klass(T_INT, "[Ljdk/internal/vm/FillerElement;", CHECK);
 347       for (int i = T_BOOLEAN; i < T_LONG+1; i++) {
 348         _typeArrayKlassObjs[i] = TypeArrayKlass::create_klass((BasicType)i, CHECK);
 349       }
 350 
 351       ClassLoaderData* null_cld = ClassLoaderData::the_null_class_loader_data();
< prev index next >