JDK-8258007 : Add instrumentation to NativeLibraryTest
Type:Sub-task
Component:core-libs
Priority:P2
Status:Resolved
Resolution:Fixed
Submitted:2020-12-09
Updated:2021-01-20
Resolved:2020-12-19
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
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.