RFR: 8373839: Disable JVM TI suspension during JNI critical regions
Patricio Chilano Mateo
pchilanomate at openjdk.org
Fri Dec 19 13:23:19 UTC 2025
On Fri, 19 Dec 2025 12:59:39 GMT, David Holmes <dholmes at openjdk.org> wrote:
> > I was thinking on having a in_critical() check in HandshakeState::try_process when the op returned by get_op() is `SuspendThreadHandshakeClosure`
>
> Checking the generic handshake code for a specific handshake operation seems like a horrendous hack - that code should never have to specialize based on the operation. The operation should handle any special cases.
>
We don't need to check for a specific operation, we can make it general by defining a virtual method in `HandshakeClosure` (e.g. `needs_jni_critical_check`) that's overriden by any operation that requires this check.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28884#issuecomment-3675063379
More information about the serviceability-dev
mailing list