RFR: 8333013: Update vmTestbase/nsk/share/LocalProcess.java to don't use finalization
Leonid Mesnik
lmesnik at openjdk.org
Tue May 28 03:20:12 UTC 2024
The vmTestbase/nsk/share/LocalProcess.java is a wrapper for debuggee process. It extends FinalizableObject to kill the debuggee process.
The debuggee process is used by nsk.jdb tests only, see runTest(...) in vmTestbase/nsk/share/jdb/JdbTest.java:
https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/JdbTest.java#L189
I verified that process is always already terminated when is cleaned during VM shutdown hook,
So the fix is just to remove the finalization.
I also moved LocalProcess into nsk.share.jdb to reduce the visibility of class and hardened checks in runTest.
-------------
Commit messages:
- 8333013: Update vmTestbase/nsk/share/LocalProcess.java to don't use finalization
Changes: https://git.openjdk.org/jdk/pull/19418/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19418&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8333013
Stats: 343 lines in 3 files changed: 156 ins; 179 del; 8 mod
Patch: https://git.openjdk.org/jdk/pull/19418.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19418/head:pull/19418
PR: https://git.openjdk.org/jdk/pull/19418
More information about the serviceability-dev
mailing list