RFR: 8328306: AArch64: MacOS lazy JIT "write xor execute" switching [v2]

Andrew Dinn adinn at openjdk.org
Tue Aug 12 10:24:15 UTC 2025


On Tue, 12 Aug 2025 10:09:11 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> src/hotspot/share/runtime/interfaceSupport.inline.hpp line 288:
>> 
>>> 286:       static WXMode wx_mode = DefaultWXWriteMode;                    \
>>> 287:       ThreadWXEnable __wx(&wx_mode, current);                        \
>>> 288:     )                                                                \
>> 
>> Why plant the WXEnable before the thread transition here when it is placed after the thread transition in the NO_ASYNC macro? Why not after in both?
>> 
>> Likewise in later occurrences what governs the placement?
>
>> Why plant the WXEnable before the thread transition here when it is placed after the thread transition in the NO_ASYNC macro? Why not after in both?
> 
> OK.
> 
>> Likewise in later occurrences what governs the placement?
> 
> The process of discovering the sweet spots we entirely empirical, not analytical.

I don't believe the order is going to matter (tell me if I am wrong) but I think it would be better to order them consistently, not just because I am a 'typical computer programmer' but because someone might be puzzled as to whether the re-ordering is significant (ok, yes, I guess that 'someone' would be a 'typical computer programmer' or maybe just me). I suggested both after because the async thread transition has a bail out and we might as well bail early . . .

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26562#discussion_r2269395398


More information about the hotspot-dev mailing list