< prev index next >

src/hotspot/share/memory/dynamicArchive.cpp

Print this page




 789   int i, count = _klasses->length();
 790 
 791   for (i = 0; i < count; i++) {
 792     InstanceKlass* ik = _klasses->at(i);
 793     sort_methods(ik);
 794   }
 795 
 796   for (i = 0; i < count; i++) {
 797     InstanceKlass* ik = _klasses->at(i);
 798     ClassLoaderData *cld = ik->class_loader_data();
 799     if (cld->is_boot_class_loader_data()) {
 800       ik->set_class_loader_type(ClassLoader::BOOT_LOADER);
 801     }
 802     else if (cld->is_platform_class_loader_data()) {
 803       ik->set_class_loader_type(ClassLoader::PLATFORM_LOADER);
 804     }
 805     else if (cld->is_system_class_loader_data()) {
 806       ik->set_class_loader_type(ClassLoader::APP_LOADER);
 807     }
 808 
 809     MetaspaceShared::rewrite_nofast_bytecodes_and_calculate_fingerprints(ik);
 810     ik->remove_unshareable_info();
 811 
 812     assert(ik->array_klasses() == NULL, "sanity");
 813 
 814     if (log_is_enabled(Debug, cds, dynamic)) {
 815       ResourceMark rm;
 816       log_debug(cds, dynamic)("klasses[%4i] = " PTR_FORMAT " %s", i, p2i(to_target(ik)), ik->external_name());
 817     }
 818   }
 819 }
 820 
 821 // The address order of the copied Symbols may be different than when the original
 822 // klasses were created. Re-sort all the tables. See Method::sort_methods().
 823 void DynamicArchiveBuilder::sort_methods(InstanceKlass* ik) const {
 824   assert(ik != NULL, "DynamicArchiveBuilder currently doesn't support dumping the base archive");
 825   if (MetaspaceShared::is_in_shared_metaspace(ik)) {
 826     // We have reached a supertype that's already in the base archive
 827     return;
 828   }
 829 




 789   int i, count = _klasses->length();
 790 
 791   for (i = 0; i < count; i++) {
 792     InstanceKlass* ik = _klasses->at(i);
 793     sort_methods(ik);
 794   }
 795 
 796   for (i = 0; i < count; i++) {
 797     InstanceKlass* ik = _klasses->at(i);
 798     ClassLoaderData *cld = ik->class_loader_data();
 799     if (cld->is_boot_class_loader_data()) {
 800       ik->set_class_loader_type(ClassLoader::BOOT_LOADER);
 801     }
 802     else if (cld->is_platform_class_loader_data()) {
 803       ik->set_class_loader_type(ClassLoader::PLATFORM_LOADER);
 804     }
 805     else if (cld->is_system_class_loader_data()) {
 806       ik->set_class_loader_type(ClassLoader::APP_LOADER);
 807     }
 808 
 809     MetaspaceShared::rewrite_nofast_bytecodes_and_calculate_fingerprints(Thread::current(), ik);
 810     ik->remove_unshareable_info();
 811 
 812     assert(ik->array_klasses() == NULL, "sanity");
 813 
 814     if (log_is_enabled(Debug, cds, dynamic)) {
 815       ResourceMark rm;
 816       log_debug(cds, dynamic)("klasses[%4i] = " PTR_FORMAT " %s", i, p2i(to_target(ik)), ik->external_name());
 817     }
 818   }
 819 }
 820 
 821 // The address order of the copied Symbols may be different than when the original
 822 // klasses were created. Re-sort all the tables. See Method::sort_methods().
 823 void DynamicArchiveBuilder::sort_methods(InstanceKlass* ik) const {
 824   assert(ik != NULL, "DynamicArchiveBuilder currently doesn't support dumping the base archive");
 825   if (MetaspaceShared::is_in_shared_metaspace(ik)) {
 826     // We have reached a supertype that's already in the base archive
 827     return;
 828   }
 829 


< prev index next >