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

Jon Masamitsu jon.masamitsu at oracle.com
Wed Apr 20 21:46:49 UTC 2016



On 04/11/2016 10:34 AM, Kirill Zhaldybin wrote:
> Dmitry,
>
> Thank you for review!
>
> Regards, Kirill
>
> On 11.04.2016 20:22, Dmitry Fazunenko wrote:
>> Kirill,
>>
>> Thanks for addressing my comments.
>> Now the change looks good to me.
>>
>> Thanks,
>> Dima
>>
>> On 11.04.2016 19:57, Kirill Zhaldybin wrote:
>>> Dmitry,
>>>
>>> Thank you for reviewing the fix!
>>>
>>> Here are a new WebRev:
>>> http://cr.openjdk.java.net/~kzhaldyb/webrevs/JDK-8132718/webrev.06/

Kirill,

Tests look good.  The only think I might add is command line
flags "-Xlog:classload=debug -Xlog:classunload=debug" .
That would print information to the output and help in diagnosing
a failure in the test.  Your choice.

Jon

>>>
>>> I rename ClassGenerator to ClassLoaderGenerator and move logic from
>>> main() method to separate one.
>>>
>>> Could you please let me know if you need any additional info?
>>>
>>> Regards, Kirill
>>>
>>> On 11.04.2016 16:42, Dmitry Fazunenko wrote:
>>>> 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
>>>> test:
>>>>
>>>> 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
>>>>          generateClassLoader(params);
>>>>      }
>>>>      public static void generateClassLoader(params) throws 
>>>> IOException {
>>>>          // logic on generation
>>>> }
>>>> }
>>>>
>>>> Thanks,
>>>> Dima
>>>>
>>>>
>>>> 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