RFR: 8310340: assert(_thread->is_interp_only_mode() || stub_caller) failed: expected a stub-caller
Patricio Chilano Mateo
pchilanomate at openjdk.org
Wed Jan 8 17:35:41 UTC 2025
On Wed, 8 Jan 2025 05:35:34 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
> The fix looks good. It is a great and important finding - thanks! What was bothering me is that the `EnterInterpOnlyModeClosure` is used in the `JvmtiEventControllerPrivate::enter_interp_only_mode()` but no `HandshakeClosure` is used in the `JvmtiEventControllerPrivate::leave_interp_only_mode()`. The handshake use for the `enter_interp_only_mode()` looks like a paranoid overkill to me. It can be I just forgot the exact reason why it is used there.
>
I see. Yes, we still need the handshake in `JvmtiEventControllerPrivate::enter_interp_only_mode` to safely walk the stack of the target to deoptimize the frames. When leaving interpreter only mode we just decrement `_interp_only_mode/_saved_interp_only_mode` so I don’t think we need anything else, other than making sure the change is atomic, which I think we guarantee by holding `JvmtiThreadState_lock`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22931#issuecomment-2578238579
More information about the hotspot-dev
mailing list