On Fri, 15 May 2026 13:25:07 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).
>
> Tobias Hartmann has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Removed useless local

It took me a bit, but I'm convinced now.

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

Marked as reviewed by mchevalier (Committer).

PR Review: 
https://git.openjdk.org/valhalla/pull/2438#pullrequestreview-4298403760

Reply via email to