src/share/vm/prims/jvmtiRedefineClasses.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/prims

src/share/vm/prims/jvmtiRedefineClasses.cpp

Print this page




3464   u2 old_method_idx = the_class->enclosing_method_method_index();
3465   the_class->set_enclosing_method_indices(
3466     scratch_class->enclosing_method_class_index(),
3467     scratch_class->enclosing_method_method_index());
3468   scratch_class->set_enclosing_method_indices(old_class_idx, old_method_idx);
3469 
3470   the_class->set_has_been_redefined();
3471 
3472   // keep track of previous versions of this class
3473   the_class->add_previous_version(scratch_class, emcp_method_count);
3474 
3475   RC_TIMER_STOP(_timer_rsc_phase1);
3476   RC_TIMER_START(_timer_rsc_phase2);
3477 
3478   // Adjust constantpool caches and vtables for all classes
3479   // that reference methods of the evolved class.
3480   AdjustCpoolCacheAndVtable adjust_cpool_cache_and_vtable(THREAD);
3481   ClassLoaderDataGraph::classes_do(&adjust_cpool_cache_and_vtable);
3482 
3483   // JSR-292 support
3484   MemberNameTable* mnt = the_class->member_names();
3485   if (mnt != NULL) {
3486     bool trace_name_printed = false;
3487     mnt->adjust_method_entries(_matching_old_methods,
3488                                _matching_new_methods,
3489                                _matching_methods_length,
3490                                &trace_name_printed);
3491   }
3492 
3493   // Fix Resolution Error table also to remove old constant pools
3494   SystemDictionary::delete_resolution_error(old_constants);
3495 
3496   if (the_class->oop_map_cache() != NULL) {
3497     // Flush references to any obsolete methods from the oop map cache
3498     // so that obsolete methods are not pinned.
3499     the_class->oop_map_cache()->flush_obsolete_entries();
3500   }
3501 
3502   // increment the classRedefinedCount field in the_class and in any
3503   // direct and indirect subclasses of the_class
3504   increment_class_counter((InstanceKlass *)the_class(), THREAD);
3505 
3506   // RC_TRACE macro has an embedded ResourceMark
3507   RC_TRACE_WITH_THREAD(0x00000001, THREAD,
3508     ("redefined name=%s, count=%d (avail_mem=" UINT64_FORMAT "K)",
3509     the_class->external_name(),
3510     java_lang_Class::classRedefinedCount(the_class_mirror),




3464   u2 old_method_idx = the_class->enclosing_method_method_index();
3465   the_class->set_enclosing_method_indices(
3466     scratch_class->enclosing_method_class_index(),
3467     scratch_class->enclosing_method_method_index());
3468   scratch_class->set_enclosing_method_indices(old_class_idx, old_method_idx);
3469 
3470   the_class->set_has_been_redefined();
3471 
3472   // keep track of previous versions of this class
3473   the_class->add_previous_version(scratch_class, emcp_method_count);
3474 
3475   RC_TIMER_STOP(_timer_rsc_phase1);
3476   RC_TIMER_START(_timer_rsc_phase2);
3477 
3478   // Adjust constantpool caches and vtables for all classes
3479   // that reference methods of the evolved class.
3480   AdjustCpoolCacheAndVtable adjust_cpool_cache_and_vtable(THREAD);
3481   ClassLoaderDataGraph::classes_do(&adjust_cpool_cache_and_vtable);
3482 
3483   // JSR-292 support
3484   {

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



3487   }
3488 
3489   // Fix Resolution Error table also to remove old constant pools
3490   SystemDictionary::delete_resolution_error(old_constants);
3491 
3492   if (the_class->oop_map_cache() != NULL) {
3493     // Flush references to any obsolete methods from the oop map cache
3494     // so that obsolete methods are not pinned.
3495     the_class->oop_map_cache()->flush_obsolete_entries();
3496   }
3497 
3498   // increment the classRedefinedCount field in the_class and in any
3499   // direct and indirect subclasses of the_class
3500   increment_class_counter((InstanceKlass *)the_class(), THREAD);
3501 
3502   // RC_TRACE macro has an embedded ResourceMark
3503   RC_TRACE_WITH_THREAD(0x00000001, THREAD,
3504     ("redefined name=%s, count=%d (avail_mem=" UINT64_FORMAT "K)",
3505     the_class->external_name(),
3506     java_lang_Class::classRedefinedCount(the_class_mirror),


src/share/vm/prims/jvmtiRedefineClasses.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File