Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-07-01 Thread Daniel Fuchs
On Fri, 1 Jul 2022 14:26:24 GMT, Roger Riggs wrote: >> Thanks @XueleiFan, that's fine by me! > > When using Reference/ReferenceQueue there is no Cleaner, only normal > reference processing (via GC). I have tests that use Reference/ReferenceQueue to check that an object that uses a Cleaner has

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-07-01 Thread Roger Riggs
On Fri, 1 Jul 2022 08:40:06 GMT, Daniel Fuchs wrote: >> @dfuch Taking a reference as parameter could simplify the use of ForceGC. >> I though about this idea as well, when I had to check lambada expressions in >> each call. I would like to do it in the future so that this PR could focus >>

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-07-01 Thread Daniel Fuchs
On Fri, 1 Jul 2022 08:26:30 GMT, Xue-Lei Andrew Fan wrote: >> Maybe not for this PR - but it could be useful to have a version of ForceGC >> that takes as parameter a `ReferenceQueue` and a `Reference`. That >> would be more efficient than creating a new object and waiting for a >> different c

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-07-01 Thread Xue-Lei Andrew Fan
On Fri, 1 Jul 2022 08:12:59 GMT, Daniel Fuchs wrote: >> True, knowing when GC is 'done' is not deterministic except for a specify >> Reference to a specific object. >> System.gc is just a request, the checking for an object can more quickly >> exit the loop. >> The code is as is, and already co

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-07-01 Thread Daniel Fuchs
On Thu, 30 Jun 2022 20:36:35 GMT, Roger Riggs wrote: >> I'm not sure if all unused object will be collected in one GC call always. >> The gc() specification says "When control returns from the method call, the >> Java Virtual Machine has made a best effort to reclaim space from all unused >>

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-06-30 Thread Roger Riggs
On Thu, 30 Jun 2022 18:39:48 GMT, Xue-Lei Andrew Fan wrote: >> test/lib/jdk/test/lib/util/ForceGC.java line 58: >> >>> 56: Reference.reachabilityFence(ref); >>> 57: >>> 58: for (int retries = (int)(timeout / 200); retries >= 0; >>> retries--) { >> >> The logic around the timeo

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-06-30 Thread Roger Riggs
On Thu, 30 Jun 2022 18:24:14 GMT, Xue-Lei Andrew Fan wrote: >> test/lib/jdk/test/lib/util/ForceGC.java line 70: >> >>> 68: // But it is fine. For most cases, the 1st GC is >>> sufficient >>> 69: // to trigger and complete the cleanup. >>> 70: que

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-06-30 Thread Xue-Lei Andrew Fan
On Thu, 30 Jun 2022 15:48:07 GMT, Roger Riggs wrote: >> Xue-Lei Andrew Fan has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 13 commits: >> >> - Master >> - use Reference.refersTo >> - remove trailing whitespaces >> - use timeou

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-06-30 Thread Xue-Lei Andrew Fan
On Thu, 30 Jun 2022 15:53:10 GMT, Roger Riggs wrote: >> Xue-Lei Andrew Fan has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 13 commits: >> >> - Master >> - use Reference.refersTo >> - remove trailing whitespaces >> - use timeou

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-06-30 Thread Roger Riggs
On Sat, 18 Jun 2022 05:55:32 GMT, Xue-Lei Andrew Fan wrote: >> This is a follow up update per comments in [JDK-8287384 >> PR](https://github.com/openjdk/jdk/pull/8907). The tier1 and tier2 test in >> open part looks good to me. Please help to run Mach5 just case the closed >> test cases are

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-06-30 Thread Xue-Lei Andrew Fan
On Sat, 18 Jun 2022 05:55:32 GMT, Xue-Lei Andrew Fan wrote: >> This is a follow up update per comments in [JDK-8287384 >> PR](https://github.com/openjdk/jdk/pull/8907). The tier1 and tier2 test in >> open part looks good to me. Please help to run Mach5 just case the closed >> test cases are

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-06-17 Thread Xue-Lei Andrew Fan
> This is a follow up update per comments in [JDK-8287384 > PR](https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/8907__;!!ACWV5N9M2RV99hQ!NNGX7uEj58t7UHOcS2PbUgT_R8PW8A2xNlmJ5N8WuCcgG8EPOLJBHAjRiwhXq_NhJ33K0VrDlHQxNLJpVy9XSw$ > ). The tier1 and tier2 test in open part looks good t