src/hotspot/share/oops/instanceKlass.cpp
changeset 53884 1a7b57d02107
parent 53864 81a9748bc86c
child 53904 9c3fe09f69bc
equal deleted inserted replaced
53883:f41793b5b83f 53884:1a7b57d02107
  2351   guarantee(_osr_nmethods_head == NULL, "must be");
  2351   guarantee(_osr_nmethods_head == NULL, "must be");
  2352 
  2352 
  2353 #if INCLUDE_JVMTI
  2353 #if INCLUDE_JVMTI
  2354   guarantee(_breakpoints == NULL, "must be");
  2354   guarantee(_breakpoints == NULL, "must be");
  2355   guarantee(_previous_versions == NULL, "must be");
  2355   guarantee(_previous_versions == NULL, "must be");
       
  2356   _cached_class_file = NULL;
  2356 #endif
  2357 #endif
  2357 
  2358 
  2358   _init_thread = NULL;
  2359   _init_thread = NULL;
  2359   _methods_jmethod_ids = NULL;
  2360   _methods_jmethod_ids = NULL;
  2360   _jni_ids = NULL;
  2361   _jni_ids = NULL;
  2507     methods_do(clear_all_breakpoints);
  2508     methods_do(clear_all_breakpoints);
  2508     assert(breakpoints() == 0x0, "should have cleared breakpoints");
  2509     assert(breakpoints() == 0x0, "should have cleared breakpoints");
  2509   }
  2510   }
  2510 
  2511 
  2511   // deallocate the cached class file
  2512   // deallocate the cached class file
  2512   if (_cached_class_file != NULL && !MetaspaceShared::is_in_shared_metaspace(_cached_class_file)) {
  2513   if (_cached_class_file != NULL) {
  2513     os::free(_cached_class_file);
  2514     os::free(_cached_class_file);
  2514     _cached_class_file = NULL;
  2515     _cached_class_file = NULL;
  2515   }
  2516   }
  2516 #endif
  2517 #endif
  2517 
  2518 
  3968   return method;
  3969   return method;
  3969 }
  3970 }
  3970 
  3971 
  3971 #if INCLUDE_JVMTI
  3972 #if INCLUDE_JVMTI
  3972 JvmtiCachedClassFileData* InstanceKlass::get_cached_class_file() {
  3973 JvmtiCachedClassFileData* InstanceKlass::get_cached_class_file() {
  3973   if (MetaspaceShared::is_in_shared_metaspace(_cached_class_file)) {
  3974   return _cached_class_file;
  3974     // Ignore the archived class stream data
       
  3975     return NULL;
       
  3976   } else {
       
  3977     return _cached_class_file;
       
  3978   }
       
  3979 }
  3975 }
  3980 
  3976 
  3981 jint InstanceKlass::get_cached_class_file_len() {
  3977 jint InstanceKlass::get_cached_class_file_len() {
  3982   return VM_RedefineClasses::get_cached_class_file_len(_cached_class_file);
  3978   return VM_RedefineClasses::get_cached_class_file_len(_cached_class_file);
  3983 }
  3979 }
  3984 
  3980 
  3985 unsigned char * InstanceKlass::get_cached_class_file_bytes() {
  3981 unsigned char * InstanceKlass::get_cached_class_file_bytes() {
  3986   return VM_RedefineClasses::get_cached_class_file_bytes(_cached_class_file);
  3982   return VM_RedefineClasses::get_cached_class_file_bytes(_cached_class_file);
  3987 }
  3983 }
  3988 
       
  3989 #if INCLUDE_CDS
       
  3990 JvmtiCachedClassFileData* InstanceKlass::get_archived_class_data() {
       
  3991   if (DumpSharedSpaces) {
       
  3992     return _cached_class_file;
       
  3993   } else {
       
  3994     assert(this->is_shared(), "class should be shared");
       
  3995     if (MetaspaceShared::is_in_shared_metaspace(_cached_class_file)) {
       
  3996       return _cached_class_file;
       
  3997     } else {
       
  3998       return NULL;
       
  3999     }
       
  4000   }
       
  4001 }
       
  4002 #endif
  3984 #endif
  4003 #endif