RFR: 8329597: C2: Intrinsify Reference.clear [v6]
Tobias Hartmann
thartmann at openjdk.org
Wed Oct 2 10:49:36 UTC 2024
On Mon, 30 Sep 2024 16:59:16 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> [JDK-8240696](https://bugs.openjdk.org/browse/JDK-8240696) added the native method for `Reference.clear`. The original patch skipped intrinsification of this method, because we thought `Reference.clear` is not on a performance sensitive path. However, it shows up prominently on simple benchmarks that touch e.g. `ThreadLocal` cleanups. See the bug for an example profile with `RRWL` benchmarks.
>>
>> We need to know the actual oop strongness/weakness before we call into C2 Access API, this work models this after existing code for `refersTo0` intrinsics. C2 Access also need a support for `AS_NO_KEEPALIVE` for stores.
>>
>> Additional testing:
>> - [ ] Linux x86_64 server fastdebug, `all`
>> - [ ] Linux AArch64 server fastdebug, `all`
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>
> Also dispatch to slow-path on other arches
test/micro/org/openjdk/bench/java/lang/ref/ReferenceClear.java line 2:
> 1: //
> 2: // * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
Drive-by comment: The `// *` format looks weird.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20139#discussion_r1784292673
More information about the core-libs-dev
mailing list