RFR: 8309399: JVMTI spec needs to clarify when OPAQUE_FRAME is thrown for reasons other than a native method [v6]

Chris Plummer cjplummer at openjdk.org
Thu Jul 10 21:19:41 UTC 2025


On Thu, 10 Jul 2025 08:24:56 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> It was decided in a local discussion with Chris and Alan to update the JVMTI spec to make descriptions/clarifications of some `JVMTI_ERROR_OPAQUE_FRAME` cases more consistent.
>> This impacts the following JVMTI spec sections:
>>   - `PopFrame`
>>   - `NotifyFramePop`
>>   - `ForceEarlyReturn<Type>`
>>   - `GetLocal<Type>`
>>   - `SetLocal<Type>`
>>   - general description of the `JVMTI_ERROR_OPAQUE_FRAME` error code
>>   
>> A related CSR is going to be filed for this spec update.
>> 
>> Testing:
>>  - it is N/A in general but mach5 tiers 1-3 will be run to be completely safe
>
> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review: minor tweak of previous change

src/hotspot/share/prims/jvmti.xml line 6233:

> 6231:         <error id="JVMTI_ERROR_OPAQUE_FRAME">
> 6232:           The implementation is unable to set the frame locals
> 6233:           (e.g. the frame at <code>depth</code> is executing a native method).

The situation here is a little different than other places where you removed the special case for virtual threads. In the other cases above there was already a description of the virtual thread support earlier in the description of the API. However, for SetLocalObject the only description of the virtual thread support is with the JVMTI_ERROR_OPAQUE_FRAME description, which is now removed. I guess to be consistent with earlier APIs, the description of virtual thread support should be added to the API description. This should probably just be done once at the beginning in the "Local Variable" section rather than separately for each API. Or you can re-add the JVMTI_ERROR_OPAQUE_FRAME description here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26111#discussion_r2198754120


More information about the hotspot-dev mailing list