> 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 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/30392/files - new: https://git.openjdk.org/jdk/pull/30392/files/fedaf339..55ae0523 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=30392&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=30392&range=00-01 Stats: 62 lines in 31 files changed: 0 ins; 0 del; 62 mod Patch: https://git.openjdk.org/jdk/pull/30392.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/30392/head:pull/30392 PR: https://git.openjdk.org/jdk/pull/30392
