RFR: 8329748: Change default value of AssertWXAtThreadSync to true
Dean Long
dlong at openjdk.org
Wed May 8 18:23:51 UTC 2024
On Wed, 8 May 2024 10:45:28 GMT, Tobias Holenstein <tholenstein at openjdk.org> wrote:
>> `WXWrite` is needed for
>>
>>
>> JfrIntrinsicSupport::return_lease ->
>> ThreadStateTransition::transition_from_native ->
>> SafepointMechanism::process_if_requested_with_exit_check ->
>> SafepointMechanism::process_if_requested ->
>> JavaThread::check_possible_safepoint ->
>> assert_wx_state(WXWrite)
>
>> Normally we would want to be in the WXExec state when executing in _thread_in_native.
> I agree. So we would need to aquire `WXWrite` twice just for `ThreadStateTransition::transition_from_java` and again for `ThreadStateTransition::transition_from_native`. I think its a bit unfortune that `WXWrite` is needed for the state transition..
I don't think we need WXWrite for transition_from_java. I don't know how useful AssertWXAtThreadSync is if it forces us to make unnecessary transitions. It seems to go in the opposite direction from the more lazy approaches discussed in JDK-8307817.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19102#discussion_r1594460019
More information about the hotspot-dev
mailing list