RFR: 8329331: Intrinsify Unsafe::setMemory [v21]

Scott Gibbons sgibbons at openjdk.org
Fri Apr 19 20:13:05 UTC 2024


On Fri, 19 Apr 2024 18:14:05 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> src/hotspot/cpu/x86/stubGenerator_x86_64.cpp line 4013:
>> 
>>> 4011:   // Initialize table for unsafe copy memeory check.
>>> 4012:   if (UnsafeMemoryAccess::_table == nullptr) {
>>> 4013:     UnsafeMemoryAccess::create_table(26);
>> 
>> How did you arrive at a table size of 26?
>
> This needs comment

I added 10 to the table size because I knew I was going to add 7 places where a mark was required for setMemory.  I left 3 for safety.  The algorithm changed so only 4 are needed.

The algorithm has since changed, so I changed this to:

`UnsafeCopyMemory::create_table(16 + 4); // 16 for copyMemory; 4 for setMemory`

I did a similar change to all other table creation numbers.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18555#discussion_r1572841521


More information about the core-libs-dev mailing list