Mercurial > hg > truffle
comparison src/share/vm/oops/instanceKlass.cpp @ 14860:8762b6b8fbb6
fix scanning of method data for redefined methods
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Thu, 27 Mar 2014 13:11:17 -0700 |
parents | d8041d695d19 |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14859:4f5c312d676e | 14860:8762b6b8fbb6 |
---|---|
3409 // RC_TRACE macro has an embedded ResourceMark | 3409 // RC_TRACE macro has an embedded ResourceMark |
3410 RC_TRACE(0x00000200, | 3410 RC_TRACE(0x00000200, |
3411 ("purge: %s(%s): prev method @%d in version @%d is alive", | 3411 ("purge: %s(%s): prev method @%d in version @%d is alive", |
3412 method->name()->as_C_string(), | 3412 method->name()->as_C_string(), |
3413 method->signature()->as_C_string(), j, i)); | 3413 method->signature()->as_C_string(), j, i)); |
3414 if (method->method_data() != NULL) { | |
3415 // Clean out any weak method links | |
3416 method->method_data()->clean_weak_method_links(); | |
3417 } | |
3414 } | 3418 } |
3415 } | 3419 } |
3416 } | 3420 } |
3417 } | 3421 } |
3418 assert(ik->previous_versions()->length() == live_count, "sanity check"); | 3422 assert(ik->previous_versions()->length() == live_count, "sanity check"); |
3419 RC_TRACE(0x00000200, | 3423 RC_TRACE(0x00000200, |
3420 ("purge: previous version stats: live=%d, deleted=%d", live_count, | 3424 ("purge: previous version stats: live=%d, deleted=%d", live_count, |
3421 deleted_count)); | 3425 deleted_count)); |
3426 } | |
3427 | |
3428 Array<Method*>* methods = ik->methods(); | |
3429 int num_methods = methods->length(); | |
3430 for (int index2 = 0; index2 < num_methods; ++index2) { | |
3431 if (methods->at(index2)->method_data() != NULL) { | |
3432 methods->at(index2)->method_data()->clean_weak_method_links(); | |
3433 } | |
3422 } | 3434 } |
3423 } | 3435 } |
3424 | 3436 |
3425 // External interface for use during class unloading. | 3437 // External interface for use during class unloading. |
3426 void InstanceKlass::purge_previous_versions(InstanceKlass* ik) { | 3438 void InstanceKlass::purge_previous_versions(InstanceKlass* ik) { |