RFR: 8273251: Call check_possible_safepoint() from SafepointMechanism::process_if_requested()
Patricio Chilano Mateo
pchilanomate at openjdk.java.net
Wed Sep 1 23:09:32 UTC 2021
On Wed, 1 Sep 2021 21:56:30 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> Looks good to me!
>
Thanks for the review Coleen!
Patricio
> 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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5342
More information about the hotspot-runtime-dev
mailing list