RFR 8165246: [REDO] InstanceKlass::_previous_version_count goes negative
coleen.phillimore at oracle.com
Tue Sep 6 16:24:56 UTC 2016
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
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
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
More information about the hotspot-runtime-dev