RFR: 8367158: C2: create better fill and copy benchmarks, taking alignment into account [v2]

Emanuel Peter epeter at openjdk.org
Thu Dec 11 07:42:30 UTC 2025


On Thu, 11 Dec 2025 07:33:31 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> test/micro/org/openjdk/bench/vm/compiler/VectorBulkOperationsArray.java line 114:
>> 
>>> 112:     public static final int REGION_2_OBJECT_OFFSET = REGION_2_BYTE_OFFSET / 8;
>>> 113: 
>>> 114:     // The arrays with the two regions each
>> 
>> Is there a reason you don't want to have 2 arrays, one as `dst` and one as `src`?
>
> Maybe I need to add some extra comments. The issue is that if you have 2 arrays, you don't know their relative alignment. You also don't have control over their distance modulo 4k. And I would like to avoid 4k aliasing effects that you get on x86 machines because of the store-to-load-forwarding only checking 12bits of the address.

I already am writing something about 4k aliasing, but I can expand the explanation.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27315#discussion_r2609512851


More information about the hotspot-compiler-dev mailing list