mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8261090: Store old classfiles in static CDS archive
Reviewed-by: iklam, minqi
This commit is contained in:
parent
159f5e1ede
commit
9499175064
29 changed files with 895 additions and 42 deletions
|
@ -1380,18 +1380,28 @@ bool SystemDictionaryShared::should_be_excluded(InstanceKlass* k) {
|
|||
// class loader doesn't expect it.
|
||||
if (has_class_failed_verification(k)) {
|
||||
warn_excluded(k, "Failed verification");
|
||||
return true;
|
||||
} else {
|
||||
warn_excluded(k, "Not linked");
|
||||
if (!MetaspaceShared::is_old_class(k)) {
|
||||
warn_excluded(k, "Not linked");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (k->major_version() < 50 /*JAVA_6_VERSION*/) {
|
||||
if (DynamicDumpSharedSpaces && k->major_version() < 50 /*JAVA_6_VERSION*/) {
|
||||
// In order to support old classes during dynamic dump, class rewriting needs to
|
||||
// be reverted. This would result in more complex code and testing but not much gain.
|
||||
ResourceMark rm;
|
||||
log_warning(cds)("Pre JDK 6 class not supported by CDS: %u.%u %s",
|
||||
k->major_version(), k->minor_version(), k->name()->as_C_string());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (MetaspaceShared::is_old_class(k) && k->is_linked()) {
|
||||
warn_excluded(k, "Old class has been linked");
|
||||
return true;
|
||||
}
|
||||
|
||||
InstanceKlass* super = k->java_super();
|
||||
if (super != NULL && should_be_excluded(super)) {
|
||||
ResourceMark rm;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue