RFR: 8329331: Intrinsify Unsafe::setMemory [v26]
Jatin Bhateja
jbhateja at openjdk.org
Sun Apr 21 23:27:44 UTC 2024
On Sat, 20 Apr 2024 22:31:48 GMT, Scott Gibbons <sgibbons at openjdk.org> wrote:
>> This code makes an intrinsic stub for `Unsafe::setMemory` for x86_64. See [this PR](https://github.com/openjdk/jdk/pull/16760) for discussion around this change.
>>
>> Overall, making this an intrinsic improves overall performance of `Unsafe::setMemory` by up to 4x for all buffer sizes.
>>
>> Tested with tier-1 (and full CI). I've added a table of the before and after numbers for the JMH I ran (`MemorySegmentZeroUnsafe`).
>>
>> [setMemoryBM.txt](https://github.com/openjdk/jdk/files/14808974/setMemoryBM.txt)
>
> Scott Gibbons has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 37 commits:
>
> - Merge branch 'openjdk:master' into setMemory
> - Fix UnsafeCopyMemoryMark scope issue
> - Long to short jmp; other cleanup
> - Review comments
> - Address review comments; update copyright years
> - Add enter() and leave(); remove Windows-specific register stuff
> - Fix memory mark after sync to upstream
> - Merge branch 'openjdk:master' into setMemory
> - Set memory test (#23)
>
> * Even more review comments
>
> * Re-write of atomic copy loops
>
> * Change name of UnsafeCopyMemory{,Mark} to UnsafeMemory{Access,Mark}
>
> * Only add a memory mark for byte unaligned fill
>
> * Remove MUSL_LIBC ifdef
>
> * Remove MUSL_LIBC ifdef
> - Set memory test (#22)
>
> * Even more review comments
>
> * Re-write of atomic copy loops
>
> * Change name of UnsafeCopyMemory{,Mark} to UnsafeMemory{Access,Mark}
>
> * Only add a memory mark for byte unaligned fill
> - ... and 27 more: https://git.openjdk.org/jdk/compare/6d569961...1122b500
Marked as reviewed by jbhateja (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/18555#pullrequestreview-2013564907
More information about the core-libs-dev
mailing list