> Improve ThreadReference.ForceEarlyReturn to support virtual threads as long 
> as they are suspended and mounted.
> 
> [JDK-8308400](https://bugs.openjdk.org/browse/JDK-8308400) improved JVMTI 
> ForceEarlyReturn support for virtual threads. The spec now says it is 
> supported if the thread is suspended at an event (not a specific event as 
> previously spec'd), and additional support may also be provided. The 
> implementation now just requires that the virtual thread be mounted, so this 
> covers being suspended at an event, but also other situations in which the 
> virtual thread is mounted.
> 
> JDWP and JDI need to line up with JVMTI. Only spec changes will be needed.
> 
> A new test was added mostly to cover the unmounted virtual thread case that 
> results in OpaqueFrameException.
> 
> forceEarlyReturn002 test had previously been updated for virtual threads to 
> expect OpaqueFrameException. These changes have all been undone since the 
> test now runs the same when using virtual threads as with platform threads.

Chris Plummer has updated the pull request incrementally with one additional 
commit since the last revision:

  Restore forceEarlyReturn() platform thread behaviour to only throw 
NativeMethodException and get rid of assert. A future CR/CSR will resolve the 
issue of OPAQUE_FRAME sometimes not meaning NativeMethodException for platform 
threads.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/14167/files
  - new: https://git.openjdk.org/jdk/pull/14167/files/89d3e110..93a18437

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

  Stats: 6 lines in 1 file changed: 2 ins; 3 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/14167.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14167/head:pull/14167

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

Reply via email to