mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8218751: Do not store original classfiles inside the CDS archive
Remove the OD shared region and decode classfiles on the fly Reviewed-by: jiangli, ccheung, sspitsyn, redestad
This commit is contained in:
parent
b7ed42eedd
commit
d06f3e7e28
16 changed files with 128 additions and 131 deletions
|
@ -2353,6 +2353,7 @@ void InstanceKlass::remove_unshareable_info() {
|
|||
#if INCLUDE_JVMTI
|
||||
guarantee(_breakpoints == NULL, "must be");
|
||||
guarantee(_previous_versions == NULL, "must be");
|
||||
_cached_class_file = NULL;
|
||||
#endif
|
||||
|
||||
_init_thread = NULL;
|
||||
|
@ -2509,7 +2510,7 @@ void InstanceKlass::release_C_heap_structures() {
|
|||
}
|
||||
|
||||
// deallocate the cached class file
|
||||
if (_cached_class_file != NULL && !MetaspaceShared::is_in_shared_metaspace(_cached_class_file)) {
|
||||
if (_cached_class_file != NULL) {
|
||||
os::free(_cached_class_file);
|
||||
_cached_class_file = NULL;
|
||||
}
|
||||
|
@ -3970,12 +3971,7 @@ Method* InstanceKlass::method_with_orig_idnum(int idnum, int version) {
|
|||
|
||||
#if INCLUDE_JVMTI
|
||||
JvmtiCachedClassFileData* InstanceKlass::get_cached_class_file() {
|
||||
if (MetaspaceShared::is_in_shared_metaspace(_cached_class_file)) {
|
||||
// Ignore the archived class stream data
|
||||
return NULL;
|
||||
} else {
|
||||
return _cached_class_file;
|
||||
}
|
||||
return _cached_class_file;
|
||||
}
|
||||
|
||||
jint InstanceKlass::get_cached_class_file_len() {
|
||||
|
@ -3985,19 +3981,4 @@ jint InstanceKlass::get_cached_class_file_len() {
|
|||
unsigned char * InstanceKlass::get_cached_class_file_bytes() {
|
||||
return VM_RedefineClasses::get_cached_class_file_bytes(_cached_class_file);
|
||||
}
|
||||
|
||||
#if INCLUDE_CDS
|
||||
JvmtiCachedClassFileData* InstanceKlass::get_archived_class_data() {
|
||||
if (DumpSharedSpaces) {
|
||||
return _cached_class_file;
|
||||
} else {
|
||||
assert(this->is_shared(), "class should be shared");
|
||||
if (MetaspaceShared::is_in_shared_metaspace(_cached_class_file)) {
|
||||
return _cached_class_file;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue