3680 // RC_TRACE macro has an embedded ResourceMark |
3680 // RC_TRACE macro has an embedded ResourceMark |
3681 RC_TRACE(0x00000200, |
3681 RC_TRACE(0x00000200, |
3682 ("purge: %s(%s): prev method @%d in version @%d is alive", |
3682 ("purge: %s(%s): prev method @%d in version @%d is alive", |
3683 method->name()->as_C_string(), |
3683 method->name()->as_C_string(), |
3684 method->signature()->as_C_string(), j, i)); |
3684 method->signature()->as_C_string(), j, i)); |
|
3685 if (method->method_data() != NULL) { |
|
3686 // Clean out any weak method links |
|
3687 method->method_data()->clean_weak_method_links(); |
|
3688 } |
3685 } |
3689 } |
3686 } |
3690 } |
3687 } |
3691 } |
3688 } |
3692 } |
3689 assert(ik->previous_versions()->length() == live_count, "sanity check"); |
3693 assert(ik->previous_versions()->length() == live_count, "sanity check"); |
3690 RC_TRACE(0x00000200, |
3694 RC_TRACE(0x00000200, |
3691 ("purge: previous version stats: live=%d, deleted=%d", live_count, |
3695 ("purge: previous version stats: live=%d, deleted=%d", live_count, |
3692 deleted_count)); |
3696 deleted_count)); |
|
3697 } |
|
3698 |
|
3699 Array<Method*>* methods = ik->methods(); |
|
3700 int num_methods = methods->length(); |
|
3701 for (int index2 = 0; index2 < num_methods; ++index2) { |
|
3702 if (methods->at(index2)->method_data() != NULL) { |
|
3703 methods->at(index2)->method_data()->clean_weak_method_links(); |
|
3704 } |
3693 } |
3705 } |
3694 } |
3706 } |
3695 |
3707 |
3696 // External interface for use during class unloading. |
3708 // External interface for use during class unloading. |
3697 void InstanceKlass::purge_previous_versions(InstanceKlass* ik) { |
3709 void InstanceKlass::purge_previous_versions(InstanceKlass* ik) { |