RFR: 8289257: Some custom loader tests failed due to symbol refcount not decremented
Ioi Lam
iklam at openjdk.org
Thu Jun 30 23:03:40 UTC 2022
On Thu, 30 Jun 2022 22:28:26 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");
LGTM
-------------
Marked as reviewed by iklam (Reviewer).
PR: https://git.openjdk.org/jdk/pull/9340
More information about the hotspot-runtime-dev
mailing list