RFR: 8373839: Disable JVM TI suspension during JNI critical regions [v2]

David Holmes dholmes at openjdk.org
Fri Dec 19 06:16:28 UTC 2025


> To ensure JNI critical access to a raw array can't interfere with actions of the debugger, we disable JVM TI suspension whilst JNI critical access is active, as originally suggested by @fisk. We assume the debugger is being operated correctly (ie the thread using the raw array will be suspended), and that the critical section is short so as to not delay debugging too long. 
> 
> The mechanism for this already exists courtesy of the virtual thread support.
> 
> Testing:
>  - tiers 1 - 6 sanity

David Holmes has updated the pull request incrementally with two additional commits since the last revision:

 - Delay suspender whilst target is in-critical
 - Revert "8373839: Disable JVM TI suspension during JNI critical regions"
   
   This reverts commit 7723275e4495cc1f514c531afe752210209617cc.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/28884/files
  - new: https://git.openjdk.org/jdk/pull/28884/files/7723275e..2df50e50

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=28884&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28884&range=00-01

  Stats: 24 lines in 3 files changed: 12 ins; 10 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/28884.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28884/head:pull/28884

PR: https://git.openjdk.org/jdk/pull/28884


More information about the serviceability-dev mailing list