hotspot/src/share/vm/oops/instanceKlass.hpp
changeset 40927 59f3c8a69541
parent 40923 10fe1c28b9f6
child 41182 dbd59c1da636
equal deleted inserted replaced
40925:04b19236aa98 40927:59f3c8a69541
   707   bool is_being_redefined() const          { return _is_being_redefined; }
   707   bool is_being_redefined() const          { return _is_being_redefined; }
   708   void set_is_being_redefined(bool value)  { _is_being_redefined = value; }
   708   void set_is_being_redefined(bool value)  { _is_being_redefined = value; }
   709 
   709 
   710   // RedefineClasses() support for previous versions:
   710   // RedefineClasses() support for previous versions:
   711   void add_previous_version(instanceKlassHandle ikh, int emcp_method_count);
   711   void add_previous_version(instanceKlassHandle ikh, int emcp_method_count);
       
   712   void purge_previous_version_list();
   712 
   713 
   713   InstanceKlass* previous_versions() const { return _previous_versions; }
   714   InstanceKlass* previous_versions() const { return _previous_versions; }
   714 #else
   715 #else
   715   InstanceKlass* previous_versions() const { return NULL; }
   716   InstanceKlass* previous_versions() const { return NULL; }
   716 #endif
   717 #endif
   766   void init_previous_versions() {
   767   void init_previous_versions() {
   767     _previous_versions = NULL;
   768     _previous_versions = NULL;
   768   }
   769   }
   769 
   770 
   770  private:
   771  private:
   771   static int  _previous_version_count;
   772   static bool  _has_previous_versions;
   772  public:
   773  public:
   773   static void purge_previous_versions(InstanceKlass* ik);
   774   static void purge_previous_versions(InstanceKlass* ik) {
   774   static bool has_previous_versions() { return _previous_version_count > 0; }
   775     if (ik->has_been_redefined()) {
       
   776       ik->purge_previous_version_list();
       
   777     }
       
   778   }
       
   779 
       
   780   static bool has_previous_versions_and_reset();
   775 
   781 
   776   // JVMTI: Support for caching a class file before it is modified by an agent that can do retransformation
   782   // JVMTI: Support for caching a class file before it is modified by an agent that can do retransformation
   777   void set_cached_class_file(JvmtiCachedClassFileData *data) {
   783   void set_cached_class_file(JvmtiCachedClassFileData *data) {
   778     _cached_class_file = data;
   784     _cached_class_file = data;
   779   }
   785   }
   790   }
   796   }
   791 
   797 
   792 #else // INCLUDE_JVMTI
   798 #else // INCLUDE_JVMTI
   793 
   799 
   794   static void purge_previous_versions(InstanceKlass* ik) { return; };
   800   static void purge_previous_versions(InstanceKlass* ik) { return; };
   795   static bool has_previous_versions() { return false; }
   801   static bool has_previous_versions_and_reset() { return false; }
   796 
   802 
   797   void set_cached_class_file(JvmtiCachedClassFileData *data) {
   803   void set_cached_class_file(JvmtiCachedClassFileData *data) {
   798     assert(data == NULL, "unexpected call with JVMTI disabled");
   804     assert(data == NULL, "unexpected call with JVMTI disabled");
   799   }
   805   }
   800   JvmtiCachedClassFileData * get_cached_class_file() { return (JvmtiCachedClassFileData *)NULL; }
   806   JvmtiCachedClassFileData * get_cached_class_file() { return (JvmtiCachedClassFileData *)NULL; }