RFR: 8114823: G1 doesn't honor request to disable class unloading

Stefan Johansson stefan.johansson at oracle.com
Fri Sep 2 11:10:08 UTC 2016


Hi,

Please review this fix for:
https://bugs.openjdk.java.net/browse/JDK-8114823

Webrev:
http://cr.openjdk.java.net/~sjohanss/8114823/hotspot.00/

Summary:
For the G1 full GC there was no explicit code to handle when class 
unloading was disabled. It worked for some cases because when 
ClassUnloading is false classes in the system dictionary were kept alive 
and never unloaded. But some types of classes, for example classes 
defined without a protection domain, were not kept alive. This fix 
changes the way we process roots in phase one of the full GC to include 
all class roots and also do the code cache scanning needed when classes 
aren't unloaded.

The fix adds similar argument parsing code as were previously added for 
CMS, so I moved them together instead of having to separate checks that 
do the same thing.

Testing:
* RBT with -XX:-ClassUnloading on various test sets.
* New regression test that previously failed now passes.
* Verified that a few crashes I saw when running -ClassUnloading went 
away with the fix.

Thanks,
Stefan


More information about the hotspot-gc-dev mailing list