[jdk16] RFR: 8258007: Add instrumentation to NativeLibraryTest [v2]

Mandy Chung mchung at openjdk.java.net
Fri Dec 18 23:45:09 UTC 2020


On Fri, 18 Dec 2020 23:37:11 GMT, Brent Christian <bchristi at openjdk.org> wrote:

>> This change adds some extra test output for NativeLibraryTest, primarily via an update to the ForceGC utility class.
>> 
>> It was observed that there was nothing preventing the Cleaner from cleaning the short-lived Object that ForceGC registers before await()/doit()/System.gc() is even called.
>> 
>> The new 'o' reference is kept alive until FoceGC.await() has been called.
>> 
>> We should find out a little more the next time NativeLibraryTest fails (or perhaps it won't fail anymore!)
>
> Brent Christian has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add sleep to ForceGC.await()

Marked as reviewed by mchung (Reviewer).

test/lib/jdk/test/lib/util/ForceGC.java line 73:

> 71:             if (s.getAsBoolean()) return true;
> 72:             doit(i);
> 73:             try { Thread.sleep(1000); } catch (InterruptedException e) {

nit: can you break the catch clause in a separate line.  Otherwise looks good.

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

PR: https://git.openjdk.java.net/jdk16/pull/53


More information about the core-libs-dev mailing list