RFR: 8223312: Utilize handshakes instead of is_thread_fully_suspended [v3]
Richard Reingruber
rrich at openjdk.java.net
Thu Oct 22 07:43:23 UTC 2020
On Wed, 21 Oct 2020 17:03:45 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1454:
>>
>>> 1452: _state->set_earlyret_pending();
>>> 1453: _state->set_earlyret_oop(ret_ob_h());
>>> 1454: _state->set_earlyret_value(_value, _tos);
>>
>> Good that these updates are done with a handshake now. Maybe I'm missing s.th. but I don't see synchronization in the older version.
>
> Agreed. @sspitsyn - This makes me wonder if the lack of
> synchronization is the cause of some instability in the
> JVM/TI ForceEarlyReturn() testing.
>
> Update: The old code only made the updates if the thread was fully
> suspended so you won't have a race between the requesting thread
> and the target thread in that case.
Yes, I meant synchronization between racing agent threads. Surely a corner case.
-------------
PR: https://git.openjdk.java.net/jdk/pull/729
More information about the serviceability-dev
mailing list