< prev index next >

src/share/vm/prims/jvmtiRedefineClasses.cpp

Print this page




4052   u2 old_method_idx = the_class->enclosing_method_method_index();
4053   the_class->set_enclosing_method_indices(
4054     scratch_class->enclosing_method_class_index(),
4055     scratch_class->enclosing_method_method_index());
4056   scratch_class->set_enclosing_method_indices(old_class_idx, old_method_idx);
4057 
4058   the_class->set_has_been_redefined();
4059 
4060   // keep track of previous versions of this class
4061   the_class->add_previous_version(scratch_class, emcp_method_count);
4062 
4063   RC_TIMER_STOP(_timer_rsc_phase1);
4064   RC_TIMER_START(_timer_rsc_phase2);
4065 
4066   // Adjust constantpool caches and vtables for all classes
4067   // that reference methods of the evolved class.
4068   AdjustCpoolCacheAndVtable adjust_cpool_cache_and_vtable(THREAD);
4069   ClassLoaderDataGraph::classes_do(&adjust_cpool_cache_and_vtable);
4070 
4071   // JSR-292 support
4072   MemberNameTable* mnt = the_class->member_names();
4073   if (mnt != NULL) {
4074     bool trace_name_printed = false;
4075     mnt->adjust_method_entries(_matching_old_methods,
4076                                _matching_new_methods,
4077                                _matching_methods_length,
4078                                &trace_name_printed);
4079   }
4080 
4081   // Fix Resolution Error table also to remove old constant pools
4082   SystemDictionary::delete_resolution_error(old_constants);
4083 
4084   if (the_class->oop_map_cache() != NULL) {
4085     // Flush references to any obsolete methods from the oop map cache
4086     // so that obsolete methods are not pinned.
4087     the_class->oop_map_cache()->flush_obsolete_entries();
4088   }
4089 
4090   // increment the classRedefinedCount field in the_class and in any
4091   // direct and indirect subclasses of the_class
4092   increment_class_counter((InstanceKlass *)the_class(), THREAD);
4093 
4094   // RC_TRACE macro has an embedded ResourceMark
4095   RC_TRACE_WITH_THREAD(0x00000001, THREAD,
4096     ("redefined name=%s, count=%d (avail_mem=" UINT64_FORMAT "K)",
4097     the_class->external_name(),
4098     java_lang_Class::classRedefinedCount(the_class_mirror),




4052   u2 old_method_idx = the_class->enclosing_method_method_index();
4053   the_class->set_enclosing_method_indices(
4054     scratch_class->enclosing_method_class_index(),
4055     scratch_class->enclosing_method_method_index());
4056   scratch_class->set_enclosing_method_indices(old_class_idx, old_method_idx);
4057 
4058   the_class->set_has_been_redefined();
4059 
4060   // keep track of previous versions of this class
4061   the_class->add_previous_version(scratch_class, emcp_method_count);
4062 
4063   RC_TIMER_STOP(_timer_rsc_phase1);
4064   RC_TIMER_START(_timer_rsc_phase2);
4065 
4066   // Adjust constantpool caches and vtables for all classes
4067   // that reference methods of the evolved class.
4068   AdjustCpoolCacheAndVtable adjust_cpool_cache_and_vtable(THREAD);
4069   ClassLoaderDataGraph::classes_do(&adjust_cpool_cache_and_vtable);
4070 
4071   // JSR-292 support
4072   {

4073     bool trace_name_printed = false;
4074     the_class->adjust_member_name_table(_matching_old_methods, _matching_new_methods, _matching_methods_length, &trace_name_printed);



4075   }
4076 
4077   // Fix Resolution Error table also to remove old constant pools
4078   SystemDictionary::delete_resolution_error(old_constants);
4079 
4080   if (the_class->oop_map_cache() != NULL) {
4081     // Flush references to any obsolete methods from the oop map cache
4082     // so that obsolete methods are not pinned.
4083     the_class->oop_map_cache()->flush_obsolete_entries();
4084   }
4085 
4086   // increment the classRedefinedCount field in the_class and in any
4087   // direct and indirect subclasses of the_class
4088   increment_class_counter((InstanceKlass *)the_class(), THREAD);
4089 
4090   // RC_TRACE macro has an embedded ResourceMark
4091   RC_TRACE_WITH_THREAD(0x00000001, THREAD,
4092     ("redefined name=%s, count=%d (avail_mem=" UINT64_FORMAT "K)",
4093     the_class->external_name(),
4094     java_lang_Class::classRedefinedCount(the_class_mirror),


< prev index next >