RFR: 8273251: Call check_possible_safepoint() from SafepointMechanism::process_if_requested()

David Holmes dholmes at openjdk.java.net
Thu Sep 2 08:02:37 UTC 2021


On Wed, 1 Sep 2021 23:06:32 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> src/hotspot/share/runtime/thread.cpp line 959:
>> 
>>> 957:     assert_wx_state(WXWrite);
>>> 958:   }
>>> 959: #endif
>> 
>> I was wondering why you moved this, but it's assert code so it makes sense to me to be with the other assert code.  Maybe check_possible_safepoint could have a better name to encompass all these checking and assertions actions but I don't know what better name to give it.
>> With this code moved here, all the other callers where there's a possible safepoint but one not taken will also check this.  Did you test on macosx aarch64 too?
>
> I already run tiers 1-3 and I'm currently running tiers 4-6. Since we already include macosx-aarch64 tasks in those tiers I didn't run any additional tests. I will run an additional test cycle macosx-aarch64 specific. I'm not expecting any failures in that area though since those other places are methods with conditional statements where in one branch we might directly call process_if_requested() already due to some _safepoint_check_always lock. Caller method check_for_valid_safepoint_state() should also be safe since it asserts we are in _thread_in_vm implying WXWrite(in any case the callers of that method could also directly call process_if_requested()). We should probably merge this two methods after I fix callers of process_if_requested() to be in _thread_in_vm.

Maybe `check_safepoint_ready` for the new name? (Not needed for this PR though.)

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

PR: https://git.openjdk.java.net/jdk/pull/5342


More information about the hotspot-runtime-dev mailing list