< prev index next >

src/hotspot/share/cds/archiveBuilder.cpp

Print this page

 669 }
 670 
 671 void ArchiveBuilder::make_klasses_shareable() {
 672   int num_instance_klasses = 0;
 673   int num_boot_klasses = 0;
 674   int num_platform_klasses = 0;
 675   int num_app_klasses = 0;
 676   int num_hidden_klasses = 0;
 677   int num_unlinked_klasses = 0;
 678   int num_unregistered_klasses = 0;
 679   int num_obj_array_klasses = 0;
 680   int num_type_array_klasses = 0;
 681 
 682   for (int i = 0; i < klasses()->length(); i++) {
 683     const char* type;
 684     const char* unlinked = "";
 685     const char* hidden = "";
 686     const char* generated = "";
 687     Klass* k = get_buffered_addr(klasses()->at(i));
 688     k->remove_java_mirror();







 689     if (k->is_objArray_klass()) {
 690       // InstanceKlass and TypeArrayKlass will in turn call remove_unshareable_info
 691       // on their array classes.
 692       num_obj_array_klasses ++;
 693       type = "array";
 694     } else if (k->is_typeArray_klass()) {
 695       num_type_array_klasses ++;
 696       type = "array";
 697       k->remove_unshareable_info();
 698     } else {
 699       assert(k->is_instance_klass(), " must be");
 700       num_instance_klasses ++;
 701       InstanceKlass* ik = InstanceKlass::cast(k);
 702       if (DynamicDumpSharedSpaces) {
 703         // For static dump, class loader type are already set.
 704         ik->assign_class_loader_type();
 705       }
 706       if (ik->is_shared_boot_class()) {
 707         type = "boot";
 708         num_boot_klasses ++;

 669 }
 670 
 671 void ArchiveBuilder::make_klasses_shareable() {
 672   int num_instance_klasses = 0;
 673   int num_boot_klasses = 0;
 674   int num_platform_klasses = 0;
 675   int num_app_klasses = 0;
 676   int num_hidden_klasses = 0;
 677   int num_unlinked_klasses = 0;
 678   int num_unregistered_klasses = 0;
 679   int num_obj_array_klasses = 0;
 680   int num_type_array_klasses = 0;
 681 
 682   for (int i = 0; i < klasses()->length(); i++) {
 683     const char* type;
 684     const char* unlinked = "";
 685     const char* hidden = "";
 686     const char* generated = "";
 687     Klass* k = get_buffered_addr(klasses()->at(i));
 688     k->remove_java_mirror();
 689 #ifdef _LP64
 690     if (UseCompactObjectHeaders) {
 691       Klass* requested_k = to_requested(k);
 692       narrowKlass nk = CompressedKlassPointers::encode_not_null(requested_k, _requested_static_archive_bottom);
 693       k->set_prototype_header(markWord::prototype().set_narrow_klass(nk));
 694     }
 695 #endif //_LP64
 696     if (k->is_objArray_klass()) {
 697       // InstanceKlass and TypeArrayKlass will in turn call remove_unshareable_info
 698       // on their array classes.
 699       num_obj_array_klasses ++;
 700       type = "array";
 701     } else if (k->is_typeArray_klass()) {
 702       num_type_array_klasses ++;
 703       type = "array";
 704       k->remove_unshareable_info();
 705     } else {
 706       assert(k->is_instance_klass(), " must be");
 707       num_instance_klasses ++;
 708       InstanceKlass* ik = InstanceKlass::cast(k);
 709       if (DynamicDumpSharedSpaces) {
 710         // For static dump, class loader type are already set.
 711         ik->assign_class_loader_type();
 712       }
 713       if (ik->is_shared_boot_class()) {
 714         type = "boot";
 715         num_boot_klasses ++;
< prev index next >