RFR 8165246: [REDO] InstanceKlass::_previous_version_count goes negative
Coleen Phillimore
coleen.phillimore at oracle.com
Wed Sep 7 12:44:31 UTC 2016
On 9/7/16 8:23 AM, George Triantafillou wrote:
> Hi Coleen,
>
> The fix looks good. One nit:
>
> src/share/vm/oops/instanceKlass.cpp:
>
> 3370 // Globally, there is at least one previous version of a class to
> walk
> 3371 // during class unloading, which is saved because there are old
> methods in the class
> 3372 // are still running. Otherwise the previous version list is
> cleaned up.
>
> Change to:
>
> 3370 // Globally, there is at least one previous version of a class to
> walk
> 3371 // during class unloading, which is saved because old methods in
> the class
> 3372 // are still running. Otherwise the previous version list is
> cleaned up.
Thanks for reviewing! I'll correct the grammar. Thank you for
noticing that.
Coleen
>
> -George
>
> On 9/6/2016 12:24 PM, Coleen Phillimore wrote:
>> Summary: make _has_previous_version a boolean that is set to true
>> when previous version of a class is added or during class unloading
>> call to purge_previous_versions
>>
>> The failed fix was because InstanceKlass's previous_versions klasses
>> were walked more than once during class unloading, because the
>> scratch classes are also on the CLD::_klasses list. This change does
>> three things. 1. Only walk the class if has_been_redefined (which is
>> not set for the scratch class), 2. set next link to NULL for the
>> scratch class when removed from the previous version list, and 3.
>> change the counter to a flag because the counter may never go to zero
>> if a CLD has redefined classes with previous versions and is
>> unloaded. For this latter case we don't need to walk previous_versions.
>>
>> I tested this with changes 1 and 2 in Kitchensink, to verify the
>> diagnosis, and then added 3 and retested.
>> Also tested with the fix for
>> https://bugs.openjdk.java.net/browse/JDK-8156137 which was checked
>> into hs_-omp repository.
>>
>> Also ran through RBT 4 tiers nightly tests.
>>
>> open webrev at http://cr.openjdk.java.net/~coleenp/8165246.01/webrev
>> bug link https://bugs.openjdk.java.net/browse/JDK-8165246
>>
>> Thanks,
>> Coleen
>>
>>
>
More information about the hotspot-runtime-dev
mailing list