RFR: 8362482: [TESTBUG] serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java: System.gc() does not provide full GC

SendaoYan syan at openjdk.org
Thu Jul 24 07:28:40 UTC 2025


On Thu, 17 Jul 2025 09:58:34 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

> Call WhiteBox.fullGC()  instead of System.gc() for a guaranteed full GC.
> It is assumed that one full GC is sufficient for these tests.
> 
> Testing was done with fastdebug and release builds on the main platforms and also on Linux/PPC64le and AIX.

test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java line 32:

> 30:  * @build jdk.test.whitebox.WhiteBox
> 31:  * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
> 32:  * @run junit/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI --enable-native-access=ALL-UNNAMED UnmountedVThreadNativeMethodAtTop

Maybe use '@run junit/othervm/native' more better.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26363#discussion_r2213125377


More information about the serviceability-dev mailing list