RFR: 8067713: Move clean_weak_method_links for redefinition out of class unloading
Coleen Phillimore
coleen.phillimore at oracle.com
Thu Dec 18 19:27:13 UTC 2014
Thank you Serguei.
On 12/17/14, 8:42 PM, serguei.spitsyn at oracle.com wrote:
> Hi Coleen,
>
> The fix looks good.
>
> One minor comment:
>
> src/share/vm/prims/jvmtiRedefineClasses.cpp
>
> 3452 // Clean method data for this class
> 3453 void VM_RedefineClasses::MethodDataCleaner::do_klass(Klass* k) {
> 3454 if (k->oop_is_instance()) {
> 3455 InstanceKlass *ik = InstanceKlass::cast(k);
> 3456 // Clean MethodData of this class's methods so they don't refer to
> 3457 // old methods that are no longer running.
> 3458 Array<Method*>* methods = ik->methods();
> 3459 int num_methods = methods->length();
> 3460 for (int index2 = 0; index2 < num_methods; ++index2) {
> 3461 if (methods->at(index2)->method_data() != NULL) {
> 3462 methods->at(index2)->method_data()->clean_weak_method_links();
> 3463 }
> 3464 }
> 3465 }
> 3466 }
>
> Why index2, not just index? :)
I copied it from code in instanceKlass where it used to be. I'll change
it to 'index'.
Thanks,
Coleen
>
> Thanks,
> Serguei
>
>
> On 12/17/14 10:05 AM, Coleen Phillimore wrote:
>> Summary: Do this work during class redefinition, only verify clean
>> during class unloading in debug mode.
>>
>> open webrev at http://cr.openjdk.java.net/~coleenp/8067713/
>> bug link https://bugs.openjdk.java.net/browse/JDK-8067713
>>
>> Roland added tests for the original bugs
>>
>> https://bugs.openjdk.java.net/browse/JDK-8038636
>> and
>> https://bugs.openjdk.java.net/browse/JDK-8040237
>>
>> test/compiler/profiling/spectrapredefineclass/Launcher.javatest/compiler/profiling/TestSpecTrapClassUnloading.java
>>
>>
>> Ran jdk/test/java/lang/instrument tests, vm.quick.testlist, testbase
>> vm.redefine.testlist (thanks to Serguei for creating this list) with
>> -Xmixed,
>> -Xcomp and
>> -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation
>> -XX:-UseOnStackReplacement -XX:-BackgroundCompilation
>> -XX:+UseTypeSpeculation -XX:TypeProfileLevel=222
>>
>> Thanks,
>> Coleen
>>
>>
>
More information about the hotspot-dev
mailing list