RFR: 8289257: Some custom loader tests failed due to symbol refcount not decremented [v2]

Coleen Phillimore coleenp at openjdk.org
Fri Jul 1 12:21:43 UTC 2022


On Fri, 1 Jul 2022 02:13:32 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> Removing the test for class loader name symbol refcount since similar test exists in runtime/ClassUnload/UnloadTest.java.
>> 
>> Tested locally on linux-x64 with ZGC. Running more tests via mach5.
>> 
>> An alternative approach would be adding a `WB.fullGC()` call after `ClassUnloadCommon.triggerUnloading()` as follows:
>> 
>> 
>> --- a/test/hotspot/jtreg/runtime/cds/appcds/customLoader/test-classes/HelloUnload.java
>> +++ b/test/hotspot/jtreg/runtime/cds/appcds/customLoader/test-classes/HelloUnload.java
>> @@ -105,6 +105,7 @@ public class HelloUnload {
>>  
>>              urlClassLoader = null; c = null; o = null;
>>              ClassUnloadCommon.triggerUnloading();
>> +            wb.fullGC();
>>              System.out.println("Is CustomLoadee alive? " + wb.isClassAlive(className));
>>              ClassUnloadCommon.failIf(wb.isClassAlive(className), "should have been unloaded");
>
> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
> 
>   remove System.currentTimeMillis() from class loader name

Yes, looks good.

-------------

Marked as reviewed by coleenp (Reviewer).

PR: https://git.openjdk.org/jdk/pull/9340


More information about the hotspot-runtime-dev mailing list