Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,19 @@
* questions.
*/

/**
* @test
/*
* @test id=default
* @bug 8252506
* @summary Verify that arraycopy intrinsics properly handle flat value class arrays with oop fields.
* @library /test/lib
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @run main compiler.valhalla.inlinetypes.TestArrayCopyWithOops
*/

/*
* @test id=do
* @bug 8252506
* @summary Verify that arraycopy intrinsics properly handle flat value class arrays with oop fields.
* @library /test/lib
Expand All @@ -33,11 +44,20 @@
* -XX:CompileCommand=dontinline,compiler.valhalla.inlinetypes.TestArrayCopyWithOops::create*
* -Xbatch
* compiler.valhalla.inlinetypes.TestArrayCopyWithOops
*/

/*
* @test id=do-no-flattening
* @bug 8252506
* @summary Verify that arraycopy intrinsics properly handle flat value class arrays with oop fields.
* @library /test/lib
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @run main/othervm -XX:CompileCommand=dontinline,compiler.valhalla.inlinetypes.TestArrayCopyWithOops::test*
* -XX:CompileCommand=dontinline,compiler.valhalla.inlinetypes.TestArrayCopyWithOops::create*
* -Xbatch -XX:-UseArrayFlattening
* compiler.valhalla.inlinetypes.TestArrayCopyWithOops
* @run main/othervm compiler.valhalla.inlinetypes.TestArrayCopyWithOops
*/

package compiler.valhalla.inlinetypes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,81 @@
*/

/*
* @test
* @test id=default
* @summary Stress test the VM internal metadata for arrays.
* @library /test/lib /
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @run main/timeout=300 compiler.valhalla.inlinetypes.TestArrayMetadata
*/

/*
* @test id=no-monomorphic
* @summary Stress test the VM internal metadata for arrays.
* @library /test/lib /
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @run main/othervm/timeout=300 compiler.valhalla.inlinetypes.TestArrayMetadata
* @run main/othervm/timeout=300 -XX:+IgnoreUnrecognizedVMOptions
* -XX:-MonomorphicArrayCheck -XX:-OmitStackTraceInFastThrow
* compiler.valhalla.inlinetypes.TestArrayMetadata
* @run main/othervm/timeout=300 -Xcomp
* compiler.valhalla.inlinetypes.TestArrayMetadata
* @run main/othervm/timeout=300 -XX:MultiArrayExpandLimit=0
compiler.valhalla.inlinetypes.TestArrayMetadata
* @run main/othervm/timeout=300 -Xbatch
* -XX:CompileCommand=compileonly,*TestArrayMetadata::* -XX:CompileCommand=dontinline,*TestArrayMetadata::test*
* compiler.valhalla.inlinetypes.TestArrayMetadata
* @run main/othervm/timeout=300 -Xbatch
* -XX:CompileCommand=compileonly,*TestArrayMetadata::* -XX:CompileCommand=dontinline,*TestArrayMetadata::*
* compiler.valhalla.inlinetypes.TestArrayMetadata
* @run main/othervm/timeout=300 -Xbatch
* -XX:CompileCommand=compileonly,*TestArrayMetadata::main -XX:CompileCommand=dontinline,*TestArrayMetadata::test*
* compiler.valhalla.inlinetypes.TestArrayMetadata
* -XX:-MonomorphicArrayCheck -XX:-OmitStackTraceInFastThrow
* compiler.valhalla.inlinetypes.TestArrayMetadata
*/

/*
* @test id=xcomp
* @summary Stress test the VM internal metadata for arrays.
* @library /test/lib /
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @run main/othervm/timeout=300 -Xcomp compiler.valhalla.inlinetypes.TestArrayMetadata
*/

/*
* @test id=expand-zero
* @summary Stress test the VM internal metadata for arrays.
* @library /test/lib /
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @run main/othervm/timeout=300 -XX:MultiArrayExpandLimit=0 compiler.valhalla.inlinetypes.TestArrayMetadata
*/

/*
* @test id=co-di-test
* @summary Stress test the VM internal metadata for arrays.
* @library /test/lib /
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @run main/othervm/timeout=300 -Xbatch -XX:CompileCommand=compileonly,*TestArrayMetadata::*
* -XX:CompileCommand=dontinline,*TestArrayMetadata::test*
* compiler.valhalla.inlinetypes.TestArrayMetadata
*/

/*
* @test id=co-di
* @summary Stress test the VM internal metadata for arrays.
* @library /test/lib /
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @run main/othervm/timeout=300 -Xbatch -XX:CompileCommand=compileonly,*TestArrayMetadata::*
* -XX:CompileCommand=dontinline,*TestArrayMetadata::*
* compiler.valhalla.inlinetypes.TestArrayMetadata
*/

/*
* @test id=co-main-di-test
* @summary Stress test the VM internal metadata for arrays.
* @library /test/lib /
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @run main/othervm/timeout=300 -Xbatch -XX:CompileCommand=compileonly,*TestArrayMetadata::main
* -XX:CompileCommand=dontinline,*TestArrayMetadata::test*
* compiler.valhalla.inlinetypes.TestArrayMetadata
*/

package compiler.valhalla.inlinetypes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import jdk.test.whitebox.WhiteBox;

/*
* @test
* @test id=default
* @summary Test support for null markers in (flat) arrays.
* @library /test/lib /
* @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64")
Expand All @@ -41,41 +41,159 @@
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
*
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -Xbatch -XX:-UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -Xbatch -XX:-UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -Xbatch -XX:-UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -Xbatch -XX:-UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -Xbatch -XX:+UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -Xbatch -XX:+UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -Xbatch -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -Xbatch -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
*
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -Xbatch -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening
* -XX:CompileCommand=dontinline,*::test* -XX:CompileCommand=dontinline,*::check*
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -Xbatch -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening
* -XX:+IgnoreUnrecognizedVMOptions -XX:-MonomorphicArrayCheck -XX:-UseArrayLoadStoreProfile
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
*/

/*
* @test id=no-flattening
* @summary Test support for null markers in (flat) arrays.
* @library /test/lib /
* @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64")
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbatch
* -XX:-UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
*/

/*
* @test id=nAVF
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick/FYI: switching from kebab case to camel case. I don't think this matters at all but wanted to point it out just in case.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good observation! I used it for "non-atomic" because it still belongs to the "A" and I did not want to confuse it with "N" for Nullable. It's a little unfortunate, though.

* @summary Test support for null markers in (flat) arrays.
* @library /test/lib /
* @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64")
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbatch
* -XX:-UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
*/

/*
* @test id=AVF
* @summary Test support for null markers in (flat) arrays.
* @library /test/lib /
* @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64")
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbatch
* -XX:-UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
*/

/*
* @test id=AVF-nAVF
* @summary Test support for null markers in (flat) arrays.
* @library /test/lib /
* @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64")
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbatch
* -XX:-UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
*/

/*
* @test id=NVF
* @summary Test support for null markers in (flat) arrays.
* @library /test/lib /
* @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64")
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbatch
* -XX:+UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
*/

/*
* @test id=NVF-nAVF
* @summary Test support for null markers in (flat) arrays.
* @library /test/lib /
* @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64")
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbatch
* -XX:+UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
*/

/*
* @test id=NVF-AVF
* @summary Test support for null markers in (flat) arrays.
* @library /test/lib /
* @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64")
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbatch
* -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
*/

/*
* @test id=all-flattening
* @summary Test support for null markers in (flat) arrays.
* @library /test/lib /
* @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64")
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbatch
* -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
*/

/*
* @test id=all-flattening-di
* @summary Test support for null markers in (flat) arrays.
* @library /test/lib /
* @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64")
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbatch
* -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening
* -XX:CompileCommand=dontinline,*::test* -XX:CompileCommand=dontinline,*::check*
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
*/

/*
* @test id=all-flattening-restrict-profiling
* @summary Test support for null markers in (flat) arrays.
* @library /test/lib /
* @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64")
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbatch
* -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening
* -XX:+IgnoreUnrecognizedVMOptions -XX:-MonomorphicArrayCheck -XX:-UseArrayLoadStoreProfile
* compiler.valhalla.inlinetypes.TestArrayNullMarkers
*/

public class TestArrayNullMarkers {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @run main/othervm compiler.valhalla.inlinetypes.TestArrayRematerializationWithProperties
* @run main compiler.valhalla.inlinetypes.TestArrayRematerializationWithProperties
* @run main/othervm -XX:-TieredCompilation -Xbatch
* -XX:CompileCommand=compileonly,*TestArrayRematerializationWithProperties::test
* compiler.valhalla.inlinetypes.TestArrayRematerializationWithProperties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
* java.base/jdk.internal.vm.annotation
* @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64")
* @enablePreview
* @run main/othervm/timeout=300 compiler.valhalla.inlinetypes.TestArrays
* @run main/timeout=300 compiler.valhalla.inlinetypes.TestArrays
*/

@ForceCompileClassInitializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @run main/othervm/timeout=300 compiler.valhalla.inlinetypes.TestBasicFunctionality
* @run main/timeout=300 compiler.valhalla.inlinetypes.TestBasicFunctionality
*/

@ForceCompileClassInitializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* @enablePreview
* @modules java.base/jdk.internal.value
* java.base/jdk.internal.vm.annotation
* @run main/othervm/timeout=300 compiler.valhalla.inlinetypes.TestC1
* @run main/timeout=300 compiler.valhalla.inlinetypes.TestC1
*/

public class TestC1 {
Expand Down
Loading