RFR: 8344883: Do not use mtNone if we know the tag type [v2]

Stefan Karlsson stefank at openjdk.org
Tue Apr 1 15:27:20 UTC 2025


On Mon, 31 Mar 2025 21:10:01 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

>> src/hotspot/share/runtime/safepointMechanism.cpp line 60:
>> 
>>> 58:     const size_t page_size = os::vm_page_size();
>>> 59:     const size_t allocation_size = 2 * page_size;
>>> 60:     char* polling_page = os::reserve_memory(allocation_size, mtSafepoint, !ExecMem);
>> 
>> Suggestion:
>> 
>>     char* polling_page = os::reserve_memory(allocation_size, mtSafepoint);
>
> I think here we need to keep `!ExecMem` since it is a parameter.

I don't understand what you mean with that. `ExecMem` is a constant and os::reserve_memory has an optional parameter `executable`.

>> src/hotspot/share/utilities/debug.cpp line 715:
>> 
>>> 713: #ifdef CAN_SHOW_REGISTERS_ON_ASSERT
>>> 714: void initialize_assert_poison() {
>>> 715:   char* page = os::reserve_memory(os::vm_page_size(), mtInternal, !ExecMem);
>> 
>> Suggestion:
>> 
>>   char* page = os::reserve_memory(os::vm_page_size(), mtInternal);
>
> Again, `ExecMem` is a parameter.

Same comment as above.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24282#discussion_r2023089682
PR Review Comment: https://git.openjdk.org/jdk/pull/24282#discussion_r2023090093


More information about the shenandoah-dev mailing list