RFR(M): 8132718: Add tests which check that when humongous classloader object becomes unreachable it and all classes that were loaded in it should be collected

Dmitry Fazunenko dmitry.fazunenko at oracle.com
Mon Apr 11 13:42:01 UTC 2016

Hi Kirill,

Thanks for addressing my previous comments. The new version looks good.
I just noticed a couple of minor improvements which could be done to the 

1) rename: ClassGenerator --> ClassLoaderGenerator

2) move logic from the on class loader generation from the main() method 
to a new one (just to make API look nicer):

class ClassLoaderGenerator () {
     public static void main(String[] args) throws IOException {
         // check args
     public static void generateClassLoader(params) throws IOException {
         // logic on generation


On 08.04.2016 16:53, Kirill Zhaldybin wrote:
> Dear all,
> Could you please review this fix for JDK-8132718?
> A new test added which creates non-humongous and humongous class 
> loaders, loads the latter into the former, then loads 4 generated 
> classes (both humongous and non-humongous) into humongous class loader.
> After all generated classes are made unreachable and the test checks 
> that all these classes are actually unloaded.
> The testlibrary part is sent as fix for 8153764.
> WebRev: 
> http://cr.openjdk.java.net/~kzhaldyb/webrevs/JDK-8132718/webrev.05/
> CR: https://bugs.openjdk.java.net/browse/JDK-8132718
> Thank you.
> Regards, Kirill

More information about the hotspot-gc-dev mailing list