equal
deleted
inserted
replaced
577 } |
577 } |
578 } |
578 } |
579 } |
579 } |
580 |
580 |
581 NOT_PRODUCT( |
581 NOT_PRODUCT( |
582 static void assert_not_anonymous_class(InstanceKlass* k) { |
582 static void assert_not_unsafe_anonymous_class(InstanceKlass* k) { |
583 assert(!(k->is_anonymous()), "cannot archive anonymous classes"); |
583 assert(!(k->is_unsafe_anonymous()), "cannot archive unsafe anonymous classes"); |
584 } |
584 } |
585 |
585 |
586 // Anonymous classes are not stored inside any dictionaries. They are created by |
586 // Unsafe anonymous classes are not stored inside any dictionaries. |
587 // SystemDictionary::parse_stream() with a non-null host_klass. |
587 static void assert_no_unsafe_anonymous_classes_in_dictionaries() { |
588 static void assert_no_anonymoys_classes_in_dictionaries() { |
588 ClassLoaderDataGraph::dictionary_classes_do(assert_not_unsafe_anonymous_class); |
589 ClassLoaderDataGraph::dictionary_classes_do(assert_not_anonymous_class); |
|
590 }) |
589 }) |
591 |
590 |
592 // Objects of the Metadata types (such as Klass and ConstantPool) have C++ vtables. |
591 // Objects of the Metadata types (such as Klass and ConstantPool) have C++ vtables. |
593 // (In GCC this is the field <Type>::_vptr, i.e., first word in the object.) |
592 // (In GCC this is the field <Type>::_vptr, i.e., first word in the object.) |
594 // |
593 // |
1394 // Remove all references outside the metadata |
1393 // Remove all references outside the metadata |
1395 tty->print("Removing unshareable information ... "); |
1394 tty->print("Removing unshareable information ... "); |
1396 remove_unshareable_in_classes(); |
1395 remove_unshareable_in_classes(); |
1397 tty->print_cr("done. "); |
1396 tty->print_cr("done. "); |
1398 |
1397 |
1399 // We don't support archiving anonymous classes. Verify that they are not stored in |
1398 // We don't support archiving unsafe anonymous classes. Verify that they are not stored in |
1400 // the any dictionaries. |
1399 // any dictionaries. |
1401 NOT_PRODUCT(assert_no_anonymoys_classes_in_dictionaries()); |
1400 NOT_PRODUCT(assert_no_unsafe_anonymous_classes_in_dictionaries()); |
1402 |
1401 |
1403 SystemDictionaryShared::finalize_verification_constraints(); |
1402 SystemDictionaryShared::finalize_verification_constraints(); |
1404 |
1403 |
1405 ArchiveCompactor::initialize(); |
1404 ArchiveCompactor::initialize(); |
1406 ArchiveCompactor::copy_and_compact(); |
1405 ArchiveCompactor::copy_and_compact(); |