8261090: Store old classfiles in static CDS archive

Reviewed-by: iklam, minqi
This commit is contained in:
Calvin Cheung 2021-04-22 15:13:29 +00:00
parent 159f5e1ede
commit 9499175064
29 changed files with 895 additions and 42 deletions

View file

@ -2454,7 +2454,11 @@ void InstanceKlass::metaspace_pointers_do(MetaspaceClosure* it) {
it->push(&_annotations);
it->push((Klass**)&_array_klasses);
it->push(&_constants);
if (!is_rewritten()) {
it->push(&_constants, MetaspaceClosure::_writable);
} else {
it->push(&_constants);
}
it->push(&_inner_classes);
#if INCLUDE_JVMTI
it->push(&_previous_versions);
@ -2491,6 +2495,12 @@ void InstanceKlass::metaspace_pointers_do(MetaspaceClosure* it) {
}
void InstanceKlass::remove_unshareable_info() {
if (MetaspaceShared::is_old_class(this)) {
// Set the old class bit.
set_is_shared_old_klass();
}
Klass::remove_unshareable_info();
if (SystemDictionaryShared::has_class_failed_verification(this)) {