< prev index next >
src/hotspot/share/classfile/systemDictionaryShared.cpp
Print this page
rev 58760 : 8238358: Implementation of JEP 371: Hidden Classes
Reviewed-by: alanb, cjplummer, coleenp, dholmes, dlong, forax, jlahoda, psandoz, plevart, vromero
Contributed-by: mandy.chung@oracle.com, lois.foltan@oracle.com, david.holmes@oracle.com, harold.seigel@oracle.com, serguei.spitsyn@oracle.com, alex.buckley@oracle.com, jamsheed.c.m@oracle.com, jan.lahoda@oracle.com, amy.lu@oracle.com
*** 912,922 ****
const ClassFileStream* cfs,
TRAPS) {
if (!UseSharedSpaces) {
return NULL;
}
! if (class_name == NULL) { // don't do this for anonymous classes
return NULL;
}
if (class_loader.is_null() ||
SystemDictionary::is_system_class_loader(class_loader()) ||
SystemDictionary::is_platform_class_loader(class_loader())) {
--- 912,922 ----
const ClassFileStream* cfs,
TRAPS) {
if (!UseSharedSpaces) {
return NULL;
}
! if (class_name == NULL) { // don't do this for hidden and unsafe anonymous classes
return NULL;
}
if (class_loader.is_null() ||
SystemDictionary::is_system_class_loader(class_loader()) ||
SystemDictionary::is_platform_class_loader(class_loader())) {
*** 1094,1106 ****
ResourceMark rm;
log_warning(cds)("Skipping %s: %s", k->name()->as_C_string(), reason);
}
bool SystemDictionaryShared::should_be_excluded(InstanceKlass* k) {
! if (k->class_loader_data()->is_unsafe_anonymous()) {
! warn_excluded(k, "Unsafe anonymous class");
! return true; // unsafe anonymous classes are not archived, skip
}
if (k->is_in_error_state()) {
warn_excluded(k, "In error state");
return true;
}
--- 1094,1106 ----
ResourceMark rm;
log_warning(cds)("Skipping %s: %s", k->name()->as_C_string(), reason);
}
bool SystemDictionaryShared::should_be_excluded(InstanceKlass* k) {
! if (k->is_hidden() || k->is_unsafe_anonymous()) {
! warn_excluded(k, "Hidden or Unsafe anonymous class");
! return true; // hidden and unsafe anonymous classes are not archived, skip
}
if (k->is_in_error_state()) {
warn_excluded(k, "In error state");
return true;
}
< prev index next >