On Fri, 21 Apr 2023 06:26:33 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> addressed review comments on new test > > src/hotspot/share/prims/jvmtiEnv.cpp line 1200: > >> 1198: } >> 1199: if (java_thread == nullptr) { // unmounted virtual thread >> 1200: return JVMTI_ERROR_OPAQUE_FRAME; > > Where is the check for "suspended at an event" that otherwise results in > `JVMTI_ERROR_OPAQUE_FRAME`? The JVMTI `StopThread` spec has this description: > The StopThread function may be used to send an asynchronous > exception to a virtual thread when it is suspended at an event. > An implementation may support sending an asynchronous exception > to a suspended virtual thread in other cases. > . . . > JVMTI_ERROR_OPAQUE_FRAME: > The thread is a suspended virtual thread and the implementation > was unable to throw an asynchronous exception from this frame. This update supports all suspended mounted cases of virtual threads and returns OPAQUE_FRAME only if the target virtual thread is suspended and unmounted. But we avoid using the mount/unmount terms in the JVMTI spec. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13546#discussion_r1173451827