On Fri, 18 Dec 2020 23:34:04 GMT, Brent Christian <bchri...@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() Looks good to me. test/lib/jdk/test/lib/util/ForceGC.java line 48: > 46: for (int i = 0; i < 10; i++) { > 47: System.gc(); > 48: System.out.format("doit %d: gc %d%n", iter, i); Could be better to keep using println(), if performance is important. ------------- Marked as reviewed by naoto (Reviewer). PR: https://git.openjdk.java.net/jdk16/pull/53