On Mon, 26 Oct 2026 10:21:07 GMT, Aleksey Shipilev <[email protected]> wrote:

> Our ongoing audit flags that newly added code (and recently modified by 
> [JDK-8394802](https://bugs.openjdk.org/browse/JDK-8394802)) in Unsafe lacks 
> @ForceInline, like some of their siblings do. It is both a code discipline 
> issue, and potential performance roadbump if we somehow decide not to inline 
> through these methods.
> 
> I marked methods that AFAICS end up calling `@IntrinsicCandidate`, so forcing 
> inlining for them pays off when we reach the intrinsic.
> 
> Additional testing:
>  - [x] Eyeballing Valhalla additions to Unsafe, no other hits
>  - [x] Linux x86_64 server fastdebug, `java/lang/invoke compiler/unsafe`
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: bef89c5f
Author:    Aleksey Shipilev <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/bef89c5f6b3bd22ee03577b5080999e9082ad8bc
Stats:     13 lines in 1 file changed: 13 ins; 0 del; 0 mod

8395827: [Valhalla] New Unsafe paths should be @ForceInline

Reviewed-by: liach, ayang

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

PR: https://git.openjdk.org/jdk/pull/33564

Reply via email to