[jdk17u-dev] RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM
Martin Doerr
mdoerr at openjdk.org
Fri Jun 23 13:59:17 UTC 2023
On Tue, 13 Jun 2023 09:02:28 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> Unclean backport to improve `Thread.isAlive` performance, and provide grounds for more backports in the area.
>
> The majority of conflicts are due to integration of Loom in JDK 19, which reshaped some Thread code. I tried to change as little in 17u as possible to avoid the change fan-out.
>
> Additional testing:
> - [x] Linux x86_64 fastdebug `tier1 tier2 tier3`
> - [x] Linux AArch64 fastdebug `tier1 tier2 tier3`
LGTM. Thanks for backporting! Please consider removing an empty line.
src/hotspot/share/prims/jvm.cpp line 2979:
> 2977:
> 2978:
> 2979:
Seems like we should better remove one empty line more (like original change).
src/java.base/share/classes/java/lang/Thread.java line 166:
> 164: * non-zero when the thread is started, and reset to zero when the thread terminates.
> 165: * A non-zero value indicates this thread isAlive().
> 166: */
Shortened comment. Ok.
-------------
Marked as reviewed by mdoerr (Reviewer).
PR Review: https://git.openjdk.org/jdk17u-dev/pull/1425#pullrequestreview-1495186509
PR Review Comment: https://git.openjdk.org/jdk17u-dev/pull/1425#discussion_r1239843335
PR Review Comment: https://git.openjdk.org/jdk17u-dev/pull/1425#discussion_r1239846737
More information about the jdk-updates-dev
mailing list