Mercurial > hg > graal-jvmci-8
diff src/share/vm/oops/klass.cpp @ 20375:6e0cb14ce59b
8046070: Class Data Sharing clean up and refactoring
Summary: Cleaned up CDS to be more configurable, maintainable and extensible
Reviewed-by: dholmes, coleenp, acorn, mchung
author | iklam |
---|---|
date | Thu, 21 Aug 2014 13:57:51 -0700 |
parents | 2c6ef90f030a |
children | 47e3110c47e8 8cb56c8cb30d |
line wrap: on
line diff
--- a/src/share/vm/oops/klass.cpp Fri Aug 22 12:03:49 2014 -0700 +++ b/src/share/vm/oops/klass.cpp Thu Aug 21 13:57:51 2014 -0700 @@ -184,6 +184,7 @@ // The klass doesn't have any references at this point. clear_modified_oops(); clear_accumulated_modified_oops(); + _shared_class_path_index = -1; } jint Klass::array_layout_helper(BasicType etype) { @@ -508,27 +509,25 @@ set_class_loader_data(NULL); } -void Klass::restore_unshareable_info(TRAPS) { +void Klass::restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, TRAPS) { TRACE_INIT_ID(this); // If an exception happened during CDS restore, some of these fields may already be // set. We leave the class on the CLD list, even if incomplete so that we don't // modify the CLD list outside a safepoint. if (class_loader_data() == NULL) { - ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data(); - // Restore class_loader_data to the null class loader data + // Restore class_loader_data set_class_loader_data(loader_data); - // Add to null class loader list first before creating the mirror + // Add to class loader list first before creating the mirror // (same order as class file parsing) loader_data->add_class(this); } - // Recreate the class mirror. The protection_domain is always null for - // boot loader, for now. + // Recreate the class mirror. // Only recreate it if not present. A previous attempt to restore may have // gotten an OOM later but keep the mirror if it was created. if (java_mirror() == NULL) { - java_lang_Class::create_mirror(this, Handle(NULL), CHECK); + java_lang_Class::create_mirror(this, protection_domain, CHECK); } }