[jdk16] RFR: 8258007: Add instrumentation to NativeLibraryTest
Brent Christian
bchristi at openjdk.java.net
Fri Dec 18 22:39:04 UTC 2020
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!)
-------------
Commit messages:
- Don't keep ForceGC'ing until we see the expected count
- Add comment about new Object reference in ForceGC
- fix spacing
- Keep ForceGC'ing until we see the expected count
- Add strongly-referenced Object to prevent cleaning before await() is called
Changes: https://git.openjdk.java.net/jdk16/pull/53/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk16&pr=53&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8258007
Stats: 10 lines in 2 files changed: 6 ins; 0 del; 4 mod
Patch: https://git.openjdk.java.net/jdk16/pull/53.diff
Fetch: git fetch https://git.openjdk.java.net/jdk16 pull/53/head:pull/53
PR: https://git.openjdk.java.net/jdk16/pull/53
More information about the core-libs-dev
mailing list