On Wed, 25 Mar 2026 05:02:17 GMT, Yasumasa Suenaga <[email protected]> wrote:

>> According to [Javadoc of 
>> `jdk.incubator.vector.Vector`](https://docs.oracle.com/en/java/javase/26/docs/api/jdk.incubator.vector/jdk/incubator/vector/Vector.html),
>>  vector classes are declared as value based class. However all vector 
>> classes (e.g. `IntVector256`) do not have `@jdk.internal.ValueBased`, so 
>> `DiagnoseSyncOnValueBasedClasses` does not affect if vector object are used 
>> as a monitor.
>> 
>> This PR fixes all of final classes of vector, but most of files were 
>> generated by `gen-src.sh`. Essense of this PR is a chenge for 
>> `X-VectorBits.java.template`.
>> After this change, we can see following logs if 
>> `-XX:DiagnoseSyncOnValueBasedClasses` is set and vector class is used as 
>> monitor object.
>> 
>> 
>> $ java --add-modules jdk.incubator.vector 
>> -XX:DiagnoseSyncOnValueBasedClasses=2  ValueBaseLock
>> WARNING: Using incubator modules: jdk.incubator.vector
>> [0.453s][info][valuebasedclasses] Synchronizing on object 0x00000000823b1258 
>> of klass jdk.incubator.vector.IntVector256
>> [0.453s][info][valuebasedclasses]       at 
>> ValueBaseLock.run(ValueBaseLock.java:9)
>> [0.453s][info][valuebasedclasses]       - locked <0x00000000823b1258> (a 
>> jdk.incubator.vector.IntVector256)
>> [0.453s][info][valuebasedclasses]       at 
>> java.lang.Thread.runWith(java.base@27-internal/Thread.java:1540)
>> [0.453s][info][valuebasedclasses]       at 
>> java.lang.Thread.run(java.base@27-internal/Thread.java:1527)
>
> Yasumasa Suenaga has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Add @ValueBased to all of VectorMask and VectorShuffle implementations

Looks reasonable. For ffm layouts and hex format, please create one jbs issue 
for each VBC addition.

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

Marked as reviewed by liach (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/30392#pullrequestreview-4006460686

Reply via email to