On Fri, 15 May 2026 10:30:37 GMT, Tobias Hartmann <[email protected]> wrote:

> We noticed that `VectorUnsignedMinMaxOperationsTest.java` timed out in the 
> Valhalla CI with `--enable-preview`. The root cause is that the test has a 
> large number of `@Run` methods that get excluded from compilation and call 
> `Verify.checkEQ(int_out[i], expected)` with `int` arguments that are 
> autoboxed by `Integer.valueOf`. I.e. we call `Integer.valueOf` which returns 
> a scalarized Integer from the interpreter and thus have to buffer via the 
> slow path (due to `-XX:-UseTLAB`) by calling 
> `StubRoutines::store_inline_type_fields_to_buf`. This is slower than 
> buffering in the callee which happens in the baseline:
> 
> Without `--enable-preview` the test runs for 6m27.851s vs. with 
> `--enable-preview` the test runs for 9m9.105s.
> 
> The fix is to add a fast path to 
> `SharedRuntime::store_inline_type_fields_to_buf` that delegates 
> initialization of the buffer to the calling stub which calls the pack handler 
> after the runtime call returned. I also moved the expensive `RegisterMap` 
> creation to the slow path. This improves runtime significantly to 5m34.543s 
> which is even faster than the baseline (don't ask me why 
> :slightly_smiling_face:).
> 
> Thanks,
> Tobias
> 
> ---------
> - [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: 84779267
Author:    Tobias Hartmann <[email protected]>
URL:       
https://git.openjdk.org/valhalla/commit/847792672efa8a1d02dca52bcedc895601470e14
Stats:     66 lines in 3 files changed: 49 ins; 16 del; 1 mod

8383997: [lworld] Buffering via SharedRuntime::store_inline_type_fields_to_buf 
is slow

Reviewed-by: mchevalier

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

PR: https://git.openjdk.org/valhalla/pull/2438

Reply via email to