RFR: 8257831: Suspend with handshakes [v6]
David Holmes
david.holmes at oracle.com
Tue Apr 13 07:42:51 UTC 2021
On 13/04/2021 5:26 pm, Robbin Ehn wrote:
> On Tue, 13 Apr 2021 02:41:41 GMT, David Holmes <dholmes at openjdk.org> wrote:
>
>>> Robbin Ehn has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:
>>>
>>> - Merge branch 'master' into SuspendInHandshake
>>> - Review fixes 2
>>> - White space fixes
>>> - Merge branch 'master' into SuspendInHandshake
>>> - Review fixes
>>> - Merge branch 'master' into SuspendInHandshake
>>> - Merge branch 'master' into SuspendInHandshake
>>> - 8257831: Suspend with handshake (review baseline)
>>
>> src/hotspot/share/runtime/objectMonitor.cpp line 447:
>>
>>> 445: // Completed the tranisition.
>>> 446: SafepointMechanism::process_if_requested(current);
>>> 447: current->set_thread_state(_thread_in_vm);
>>
>> I feel very uncomfortable that we remain _thread_blocked_trans across such a lengthy chunk of code - particularly the call to exit()! This is an abuse of the trans states which are only supposed to exist and be used to ensure the correctness of the Dekker-duality when setting and reading the thread state.
>>
>> And I still would prefer to see these state changes and related safepoint-mechanism checks encapsulated somehow.
>
> Yes we should figure out something here.
Could be a neat use of a lambda "on_suspension_do" ...
> Note that we use to call exit() while blocked.
Yes, it is the use of trans that concerns me here as very little code
expects to encounter a trans-state.
Thanks,
David
> -------------
>
> PR: https://git.openjdk.java.net/jdk/pull/3191
>
More information about the hotspot-runtime-dev
mailing list