hotspot/src/share/vm/oops/instanceKlass.cpp
changeset 18940 d39d4765e6cb
parent 18687 5a0543c157c9
child 19326 14cb6cf26a96
equal deleted inserted replaced
18938:ff8f8cec9434 18940:d39d4765e6cb
    46 #include "oops/method.hpp"
    46 #include "oops/method.hpp"
    47 #include "oops/oop.inline.hpp"
    47 #include "oops/oop.inline.hpp"
    48 #include "oops/symbol.hpp"
    48 #include "oops/symbol.hpp"
    49 #include "prims/jvmtiExport.hpp"
    49 #include "prims/jvmtiExport.hpp"
    50 #include "prims/jvmtiRedefineClassesTrace.hpp"
    50 #include "prims/jvmtiRedefineClassesTrace.hpp"
       
    51 #include "prims/jvmtiRedefineClasses.hpp"
    51 #include "prims/methodComparator.hpp"
    52 #include "prims/methodComparator.hpp"
    52 #include "runtime/fieldDescriptor.hpp"
    53 #include "runtime/fieldDescriptor.hpp"
    53 #include "runtime/handles.inline.hpp"
    54 #include "runtime/handles.inline.hpp"
    54 #include "runtime/javaCalls.hpp"
    55 #include "runtime/javaCalls.hpp"
    55 #include "runtime/mutexLocker.hpp"
    56 #include "runtime/mutexLocker.hpp"
   289   set_annotations(NULL);
   290   set_annotations(NULL);
   290   set_jvmti_cached_class_field_map(NULL);
   291   set_jvmti_cached_class_field_map(NULL);
   291   set_initial_method_idnum(0);
   292   set_initial_method_idnum(0);
   292   _dependencies = NULL;
   293   _dependencies = NULL;
   293   set_jvmti_cached_class_field_map(NULL);
   294   set_jvmti_cached_class_field_map(NULL);
   294   set_cached_class_file(NULL, 0);
   295   set_cached_class_file(NULL);
   295   set_initial_method_idnum(0);
   296   set_initial_method_idnum(0);
   296   set_minor_version(0);
   297   set_minor_version(0);
   297   set_major_version(0);
   298   set_major_version(0);
   298   NOT_PRODUCT(_verify_count = 0;)
   299   NOT_PRODUCT(_verify_count = 0;)
   299 
   300 
  2355     delete _previous_versions;
  2356     delete _previous_versions;
  2356     _previous_versions = NULL;
  2357     _previous_versions = NULL;
  2357   }
  2358   }
  2358 
  2359 
  2359   // deallocate the cached class file
  2360   // deallocate the cached class file
  2360   if (_cached_class_file_bytes != NULL) {
  2361   if (_cached_class_file != NULL) {
  2361     os::free(_cached_class_file_bytes, mtClass);
  2362     os::free(_cached_class_file, mtClass);
  2362     _cached_class_file_bytes = NULL;
  2363     _cached_class_file = NULL;
  2363     _cached_class_file_len = 0;
       
  2364   }
  2364   }
  2365 
  2365 
  2366   // Decrement symbol reference counts associated with the unloaded class.
  2366   // Decrement symbol reference counts associated with the unloaded class.
  2367   if (_name != NULL) _name->decrement_refcount();
  2367   if (_name != NULL) _name->decrement_refcount();
  2368   // unreference array name derived from this class name (arrays of an unloaded
  2368   // unreference array name derived from this class name (arrays of an unloaded
  3528     }
  3528     }
  3529   }
  3529   }
  3530   return m;
  3530   return m;
  3531 }
  3531 }
  3532 
  3532 
       
  3533 jint InstanceKlass::get_cached_class_file_len() {
       
  3534   return VM_RedefineClasses::get_cached_class_file_len(_cached_class_file);
       
  3535 }
       
  3536 
       
  3537 unsigned char * InstanceKlass::get_cached_class_file_bytes() {
       
  3538   return VM_RedefineClasses::get_cached_class_file_bytes(_cached_class_file);
       
  3539 }
       
  3540 
  3533 
  3541 
  3534 // Construct a PreviousVersionNode entry for the array hung off
  3542 // Construct a PreviousVersionNode entry for the array hung off
  3535 // the InstanceKlass.
  3543 // the InstanceKlass.
  3536 PreviousVersionNode::PreviousVersionNode(ConstantPool* prev_constant_pool,
  3544 PreviousVersionNode::PreviousVersionNode(ConstantPool* prev_constant_pool,
  3537   bool prev_cp_is_weak, GrowableArray<Method*>* prev_EMCP_methods) {
  3545   bool prev_cp_is_weak, GrowableArray<Method*>* prev_EMCP_methods) {