From ae093cc7b73ce182534fafc70e8141565a18b616 Mon Sep 17 00:00:00 2001 From: Christian Hagedorn Date: Tue, 14 Oct 2025 19:09:39 +0200 Subject: [PATCH 1/2] 8369437: [lworld] Split multiple @run statements in compiler tests into separate groups --- .../inlinetypes/TestArrayCopyWithOops.java | 26 +- .../inlinetypes/TestArrayMetadata.java | 86 +++++-- .../inlinetypes/TestArrayNullMarkers.java | 190 ++++++++++++--- ...tArrayRematerializationWithProperties.java | 2 +- .../valhalla/inlinetypes/TestArrays.java | 2 +- .../inlinetypes/TestBasicFunctionality.java | 2 +- .../compiler/valhalla/inlinetypes/TestC1.java | 2 +- .../valhalla/inlinetypes/TestC2CCalls.java | 82 +++++-- .../inlinetypes/TestCallingConventionC1.java | 2 +- .../TestDeoptimizationWhenBuffering.java | 89 ++++++- .../inlinetypes/TestFieldNullMarkers.java | 223 +++++++++++++++--- .../inlinetypes/TestFlatArrayThreshold.java | 2 +- .../inlinetypes/TestGetfieldChains.java | 2 +- .../valhalla/inlinetypes/TestJNICalls.java | 4 +- .../valhalla/inlinetypes/TestLWorld.java | 2 +- .../inlinetypes/TestLWorldProfiling.java | 2 +- .../valhalla/inlinetypes/TestLarvalState.java | 4 +- .../inlinetypes/TestMethodHandles.java | 2 +- .../inlinetypes/TestNullableArrays.java | 2 +- .../inlinetypes/TestNullableInlineTypes.java | 2 +- .../inlinetypes/TestOnStackReplacement.java | 2 +- .../TestOopsInReturnConvention.java | 151 +++++++++--- .../valhalla/inlinetypes/TestTearing.java | 222 +++++++++++++++-- .../inlinetypes/TestUnexpectedMemBar.java | 22 +- .../TestUnloadedInlineTypeArray.java | 77 +++++- .../TestUnresolvedInlineClass.java | 2 +- .../inlinetypes/TestValueClasses.java | 2 +- .../TestValueRematDuringTypeSharpening.java | 4 +- .../inlinetypes/TestVirtualThreads.java | 191 ++++++++++++--- 29 files changed, 1181 insertions(+), 220 deletions(-) diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayCopyWithOops.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayCopyWithOops.java index 28d3446bd68..a434f758c9b 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayCopyWithOops.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayCopyWithOops.java @@ -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 @@ -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; diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayMetadata.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayMetadata.java index 619bd8145cb..cb9d7365791 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayMetadata.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayMetadata.java @@ -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; diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayNullMarkers.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayNullMarkers.java index 9550ffb7726..90ebefa7ab2 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayNullMarkers.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayNullMarkers.java @@ -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") @@ -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 + * @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 { diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayRematerializationWithProperties.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayRematerializationWithProperties.java index 1b70d7b09b5..8204a95bb2a 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayRematerializationWithProperties.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrayRematerializationWithProperties.java @@ -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 diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrays.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrays.java index 75d9b0da47a..1695017c189 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrays.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrays.java @@ -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 diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestBasicFunctionality.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestBasicFunctionality.java index 656c4fd4bfd..046c8ff3e92 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestBasicFunctionality.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestBasicFunctionality.java @@ -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 diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestC1.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestC1.java index 3be040e31d4..8e223680b80 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestC1.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestC1.java @@ -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 { diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestC2CCalls.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestC2CCalls.java index d8327d90c26..da186056ba2 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestC2CCalls.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestC2CCalls.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,8 +21,8 @@ * questions. */ -/** - * @test +/* + * @test id=default * @key randomness * @summary Test value class calling convention with compiled to compiled calls. * @library /test/lib /compiler/whitebox / @@ -30,29 +30,71 @@ * @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 - * TestC2CCalls + * compiler.valhalla.inlinetypes.TestC2CCalls + */ + +/* + * @test id=no-bimorphic + * @key randomness + * @summary Test value class calling convention with compiled to compiled calls. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @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 - * -XX:-UseBimorphicInlining -Xbatch - * -XX:CompileCommand=compileonly,TestC2CCalls*::test* - * -XX:CompileCommand=dontinline,TestC2CCalls*::test* - * TestC2CCalls + * -XX:-UseBimorphicInlining -Xbatch + * -XX:CompileCommand=compileonly,TestC2CCalls*::test* + * -XX:CompileCommand=dontinline,TestC2CCalls*::test* + * compiler.valhalla.inlinetypes.TestC2CCalls + */ + +/* + * @test id=no-bimorphic-no-prof + * @key randomness + * @summary Test value class calling convention with compiled to compiled calls. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @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 - * -XX:-UseBimorphicInlining -Xbatch -XX:-ProfileInterpreter - * -XX:CompileCommand=compileonly,TestC2CCalls*::test* - * -XX:CompileCommand=dontinline,TestC2CCalls*::test* - * TestC2CCalls + * -XX:-UseBimorphicInlining -Xbatch -XX:-ProfileInterpreter + * -XX:CompileCommand=compileonly,TestC2CCalls*::test* + * -XX:CompileCommand=dontinline,TestC2CCalls*::test* + * compiler.valhalla.inlinetypes.TestC2CCalls + */ + +/* + * @test id=no-bimorphic2 + * @key randomness + * @summary Test value class calling convention with compiled to compiled calls. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @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 - * -XX:-UseBimorphicInlining -Xbatch - * -XX:CompileCommand=compileonly,TestC2CCalls::test* - * -XX:CompileCommand=dontinline,TestC2CCalls*::test* - * TestC2CCalls + * -XX:-UseBimorphicInlining -Xbatch + * -XX:CompileCommand=compileonly,TestC2CCalls::test* + * -XX:CompileCommand=dontinline,TestC2CCalls*::test* + * compiler.valhalla.inlinetypes.TestC2CCalls + */ + +/* + * @test id=no-bimorphic-no-prof2 + * @key randomness + * @summary Test value class calling convention with compiled to compiled calls. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @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 - * -XX:-UseBimorphicInlining -Xbatch -XX:-ProfileInterpreter - * -XX:CompileCommand=compileonly,TestC2CCalls::test* - * -XX:CompileCommand=dontinline,TestC2CCalls*::test* - * TestC2CCalls + * -XX:-UseBimorphicInlining -Xbatch -XX:-ProfileInterpreter + * -XX:CompileCommand=compileonly,TestC2CCalls::test* + * -XX:CompileCommand=dontinline,TestC2CCalls*::test* + * compiler.valhalla.inlinetypes.TestC2CCalls */ +package compiler.valhalla.inlinetypes; + import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collections; diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestCallingConventionC1.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestCallingConventionC1.java index bf6a06b1c69..3099180d17a 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestCallingConventionC1.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestCallingConventionC1.java @@ -44,7 +44,7 @@ * @enablePreview * @modules java.base/jdk.internal.value * java.base/jdk.internal.vm.annotation - * @run main/othervm/timeout=300 compiler.valhalla.inlinetypes.TestCallingConventionC1 + * @run main/timeout=300 compiler.valhalla.inlinetypes.TestCallingConventionC1 */ @ForceCompileClassInitializer diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestDeoptimizationWhenBuffering.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestDeoptimizationWhenBuffering.java index c962b983385..b82b725c5ee 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestDeoptimizationWhenBuffering.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestDeoptimizationWhenBuffering.java @@ -35,8 +35,8 @@ import jdk.test.whitebox.WhiteBox; -/** - * @test TestDeoptimizationWhenBuffering +/* + * @test id=default * @summary Test correct execution after deoptimizing from inline type specific runtime calls. * @library /testlibrary /test/lib /compiler/whitebox / * @enablePreview @@ -44,39 +44,122 @@ * java.base/jdk.internal.vm.annotation * @build org.openjdk.asmtools.* org.openjdk.asmtools.jasm.* * @build jdk.test.whitebox.WhiteBox - * @enablePreview * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+DeoptimizeALot -XX:CompileCommand=dontinline,compiler.valhalla.inlinetypes.*::test* * compiler.valhalla.inlinetypes.TestDeoptimizationWhenBuffering C1 + */ + +/* + * @test id=no-TLAB + * @summary Test correct execution after deoptimizing from inline type specific runtime calls. + * @library /testlibrary /test/lib /compiler/whitebox / + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @build org.openjdk.asmtools.* org.openjdk.asmtools.jasm.* + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+DeoptimizeALot -XX:-UseTLAB -Xbatch * compiler.valhalla.inlinetypes.TestDeoptimizationWhenBuffering + */ + +/* + * @test id=no-mono-no-field + * @summary Test correct execution after deoptimizing from inline type specific runtime calls. + * @library /testlibrary /test/lib /compiler/whitebox / + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @build org.openjdk.asmtools.* org.openjdk.asmtools.jasm.* + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+DeoptimizeALot -XX:-UseTLAB -Xbatch -XX:-MonomorphicArrayCheck -XX:-AlwaysIncrementalInline * -XX:-InlineTypePassFieldsAsArgs -XX:-InlineTypeReturnedAsFields -XX:+UseArrayFlattening * -XX:CompileCommand=dontinline,compiler.valhalla.inlinetypes.*::test* * compiler.valhalla.inlinetypes.TestDeoptimizationWhenBuffering + */ + +/* + * @test id=no-mono-no-field-AII + * @summary Test correct execution after deoptimizing from inline type specific runtime calls. + * @library /testlibrary /test/lib /compiler/whitebox / + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @build org.openjdk.asmtools.* org.openjdk.asmtools.jasm.* + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+DeoptimizeALot -XX:-UseTLAB -Xbatch -XX:-MonomorphicArrayCheck -XX:+AlwaysIncrementalInline * -XX:-InlineTypePassFieldsAsArgs -XX:-InlineTypeReturnedAsFields -XX:+UseArrayFlattening * -XX:CompileCommand=dontinline,compiler.valhalla.inlinetypes.*::test* * compiler.valhalla.inlinetypes.TestDeoptimizationWhenBuffering + */ + +/* + * @test id=no-mono + * @summary Test correct execution after deoptimizing from inline type specific runtime calls. + * @library /testlibrary /test/lib /compiler/whitebox / + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @build org.openjdk.asmtools.* org.openjdk.asmtools.jasm.* + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+DeoptimizeALot -XX:-UseTLAB -Xbatch -XX:-MonomorphicArrayCheck -XX:-AlwaysIncrementalInline * -XX:+InlineTypePassFieldsAsArgs -XX:+InlineTypeReturnedAsFields -XX:+UseArrayFlattening * -XX:CompileCommand=dontinline,compiler.valhalla.inlinetypes.*::test* * compiler.valhalla.inlinetypes.TestDeoptimizationWhenBuffering + */ + +/* + * @test id=no-mono-AII + * @summary Test correct execution after deoptimizing from inline type specific runtime calls. + * @library /testlibrary /test/lib /compiler/whitebox / + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @build org.openjdk.asmtools.* org.openjdk.asmtools.jasm.* + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+DeoptimizeALot -XX:-UseTLAB -Xbatch -XX:-MonomorphicArrayCheck -XX:+AlwaysIncrementalInline * -XX:+InlineTypePassFieldsAsArgs -XX:+InlineTypeReturnedAsFields -XX:+UseArrayFlattening * -XX:CompileCommand=dontinline,compiler.valhalla.inlinetypes.*::test* * compiler.valhalla.inlinetypes.TestDeoptimizationWhenBuffering + */ + +/* + * @test id=no-mono-no-FF + * @summary Test correct execution after deoptimizing from inline type specific runtime calls. + * @library /testlibrary /test/lib /compiler/whitebox / + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @build org.openjdk.asmtools.* org.openjdk.asmtools.jasm.* + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+DeoptimizeALot -XX:-UseTLAB -Xbatch -XX:-MonomorphicArrayCheck -XX:-AlwaysIncrementalInline * -XX:+InlineTypePassFieldsAsArgs -XX:+InlineTypeReturnedAsFields -XX:+UseArrayFlattening -XX:-UseFieldFlattening * -XX:CompileCommand=dontinline,compiler.valhalla.inlinetypes.*::test* * compiler.valhalla.inlinetypes.TestDeoptimizationWhenBuffering + */ + +/* + * @test id=no-mono-no-FF-AII + * @summary Test correct execution after deoptimizing from inline type specific runtime calls. + * @library /testlibrary /test/lib /compiler/whitebox / + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @build org.openjdk.asmtools.* org.openjdk.asmtools.jasm.* + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+DeoptimizeALot -XX:-UseTLAB -Xbatch -XX:-MonomorphicArrayCheck -XX:+AlwaysIncrementalInline * -XX:+InlineTypePassFieldsAsArgs -XX:+InlineTypeReturnedAsFields -XX:+UseArrayFlattening -XX:-UseFieldFlattening diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestFieldNullMarkers.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestFieldNullMarkers.java index 4ca10f1ba97..352da800c31 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestFieldNullMarkers.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestFieldNullMarkers.java @@ -31,7 +31,7 @@ import jdk.test.lib.Asserts; /* - * @test + * @test id=noFlags * @key randomness * @summary Test support for null markers in flat fields. * @library /test/lib / @@ -39,39 +39,194 @@ * @enablePreview * @modules java.base/jdk.internal.value * java.base/jdk.internal.vm.annotation - * @run main/othervm/timeout=300 compiler.valhalla.inlinetypes.TestFieldNullMarkers - * @run main/othervm/timeout=300 -Xbatch -XX:-UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening - * compiler.valhalla.inlinetypes.TestFieldNullMarkers - * @run main/othervm/timeout=300 -Xbatch -XX:-UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening - * compiler.valhalla.inlinetypes.TestFieldNullMarkers - * @run main/othervm/timeout=300 -Xbatch -XX:-UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening - * compiler.valhalla.inlinetypes.TestFieldNullMarkers - * @run main/othervm/timeout=300 -Xbatch -XX:-UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening - * compiler.valhalla.inlinetypes.TestFieldNullMarkers - * @run main/othervm/timeout=300 -Xbatch -XX:+UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening - * compiler.valhalla.inlinetypes.TestFieldNullMarkers - * @run main/othervm/timeout=300 -Xbatch -XX:+UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening - * compiler.valhalla.inlinetypes.TestFieldNullMarkers - * @run main/othervm/timeout=300 -Xbatch -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening - * compiler.valhalla.inlinetypes.TestFieldNullMarkers - * @run main/othervm/timeout=300 -Xbatch -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening - * compiler.valhalla.inlinetypes.TestFieldNullMarkers - * - * @run main/othervm/timeout=300 -Xbatch -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening - * -XX:CompileCommand=dontinline,*::testHelper* - * compiler.valhalla.inlinetypes.TestFieldNullMarkers - * @run main/othervm/timeout=300 -Xbatch -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening - * -XX:+InlineTypeReturnedAsFields -XX:+InlineTypePassFieldsAsArgs - * compiler.valhalla.inlinetypes.TestFieldNullMarkers - * @run main/othervm/timeout=300 -Xbatch -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening - * -XX:-InlineTypeReturnedAsFields -XX:-InlineTypePassFieldsAsArgs - * compiler.valhalla.inlinetypes.TestFieldNullMarkers - * @run main/othervm/timeout=300 -Xbatch -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening - * -XX:+InlineTypeReturnedAsFields -XX:-InlineTypePassFieldsAsArgs - * compiler.valhalla.inlinetypes.TestFieldNullMarkers - * @run main/othervm/timeout=300 -Xbatch -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening - * -XX:-InlineTypeReturnedAsFields -XX:+InlineTypePassFieldsAsArgs - * compiler.valhalla.inlinetypes.TestFieldNullMarkers + * @run main/timeout=300 compiler.valhalla.inlinetypes.TestFieldNullMarkers + */ + +/* + * @test id=no-flattening + * @key randomness + * @summary Test support for null markers in flat fields. + * @library /test/lib / + * @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64") + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm/timeout=300 -Xbatch + * -XX:-UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening + * compiler.valhalla.inlinetypes.TestFieldNullMarkers + */ + +/* + * @test id=nAVF + * @key randomness + * @summary Test support for null markers in flat fields. + * @library /test/lib / + * @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64") + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm/timeout=300 -Xbatch + * -XX:-UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening + * compiler.valhalla.inlinetypes.TestFieldNullMarkers + */ + +/* + * @test id=AVF + * @key randomness + * @summary Test support for null markers in flat fields. + * @library /test/lib / + * @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64") + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm/timeout=300 -Xbatch + * -XX:-UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening + * compiler.valhalla.inlinetypes.TestFieldNullMarkers + */ + +/* + * @test id=AVF-nAVF + * @key randomness + * @summary Test support for null markers in flat fields. + * @library /test/lib / + * @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64") + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm/timeout=300 -Xbatch + * -XX:-UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening + * compiler.valhalla.inlinetypes.TestFieldNullMarkers + */ + +/* + * @test id=NVF + * @key randomness + * @summary Test support for null markers in flat fields. + * @library /test/lib / + * @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64") + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm/timeout=300 -Xbatch + * -XX:+UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening + * compiler.valhalla.inlinetypes.TestFieldNullMarkers + */ + +/* + * @test id=NVF-nAVF + * @key randomness + * @summary Test support for null markers in flat fields. + * @library /test/lib / + * @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64") + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm/timeout=300 -Xbatch + * -XX:+UseNullableValueFlattening -XX:-UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening + * compiler.valhalla.inlinetypes.TestFieldNullMarkers + */ + +/* + * @test id=NVF-AVF + * @key randomness + * @summary Test support for null markers in flat fields. + * @library /test/lib / + * @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64") + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm/timeout=300 -Xbatch + * -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:-UseNonAtomicValueFlattening + * compiler.valhalla.inlinetypes.TestFieldNullMarkers + */ + +/* + * @test id=all-flattening + * @key randomness + * @summary Test support for null markers in flat fields. + * @library /test/lib / + * @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64") + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm/timeout=300 -Xbatch + * -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening + * compiler.valhalla.inlinetypes.TestFieldNullMarkers + */ + +/* + * @test id=all-flattening-di + * @key randomness + * @summary Test support for null markers in flat fields. + * @library /test/lib / + * @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64") + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm/timeout=300 -Xbatch + * -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening + * -XX:CompileCommand=dontinline,*::testHelper* + * compiler.valhalla.inlinetypes.TestFieldNullMarkers + */ + +/* + * @test id=all-flattening-pass-fields + * @key randomness + * @summary Test support for null markers in flat fields. + * @library /test/lib / + * @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64") + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm/timeout=300 -Xbatch + * -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening + * -XX:+InlineTypeReturnedAsFields -XX:+InlineTypePassFieldsAsArgs + * compiler.valhalla.inlinetypes.TestFieldNullMarkers + */ + +/* + * @test id=all-flattening-no-pass-fields + * @key randomness + * @summary Test support for null markers in flat fields. + * @library /test/lib / + * @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64") + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm/timeout=300 -Xbatch + * -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening + * -XX:-InlineTypeReturnedAsFields -XX:-InlineTypePassFieldsAsArgs + * compiler.valhalla.inlinetypes.TestFieldNullMarkers + */ + +/* + * @test id=all-flattening-return-fields + * @key randomness + * @summary Test support for null markers in flat fields. + * @library /test/lib / + * @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64") + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm/timeout=300 -Xbatch + * -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening + * -XX:+InlineTypeReturnedAsFields -XX:-InlineTypePassFieldsAsArgs + * compiler.valhalla.inlinetypes.TestFieldNullMarkers + */ + +/* + * @test id=all-flattening-pass-args + * @key randomness + * @summary Test support for null markers in flat fields. + * @library /test/lib / + * @requires (os.simpleArch == "x64" | os.simpleArch == "aarch64") + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm/timeout=300 -Xbatch + * -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseNonAtomicValueFlattening + * -XX:-InlineTypeReturnedAsFields -XX:+InlineTypePassFieldsAsArgs + * compiler.valhalla.inlinetypes.TestFieldNullMarkers */ public class TestFieldNullMarkers { diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestFlatArrayThreshold.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestFlatArrayThreshold.java index 6c4b0211908..95488836a65 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestFlatArrayThreshold.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestFlatArrayThreshold.java @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @summary Test accessing value class arrays that exceed the flattening threshold. * @library /test/lib diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestGetfieldChains.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestGetfieldChains.java index db7b067431b..e9986106979 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestGetfieldChains.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestGetfieldChains.java @@ -45,7 +45,7 @@ * @modules java.base/jdk.internal.value * java.base/jdk.internal.vm.annotation * @compile GetfieldChains.jcod - * @run main/othervm/timeout=300 compiler.valhalla.inlinetypes.TestGetfieldChains + * @run main/timeout=300 compiler.valhalla.inlinetypes.TestGetfieldChains */ @LooselyConsistentValue diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestJNICalls.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestJNICalls.java index e780d765fca..6ccbe17ca8f 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestJNICalls.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestJNICalls.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,7 +38,7 @@ * @enablePreview * @modules java.base/jdk.internal.value * java.base/jdk.internal.vm.annotation - * @run main/othervm/timeout=300 compiler.valhalla.inlinetypes.TestJNICalls + * @run main/timeout=300 compiler.valhalla.inlinetypes.TestJNICalls */ @ForceCompileClassInitializer diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLWorld.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLWorld.java index c2318c8179e..aa5b75613a1 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLWorld.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLWorld.java @@ -71,7 +71,7 @@ * @modules java.base/jdk.internal.value * java.base/jdk.internal.vm.annotation * @build test.java.lang.invoke.lib.InstructionHelper - * @run main/othervm/timeout=600 compiler.valhalla.inlinetypes.TestLWorld + * @run main/timeout=600 compiler.valhalla.inlinetypes.TestLWorld */ @ForceCompileClassInitializer diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLWorldProfiling.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLWorldProfiling.java index bb75f1eb51c..c787439c0fb 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLWorldProfiling.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLWorldProfiling.java @@ -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.TestLWorldProfiling + * @run main/timeout=300 compiler.valhalla.inlinetypes.TestLWorldProfiling */ @ForceCompileClassInitializer diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLarvalState.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLarvalState.java index 770633557cf..2924df3cdae 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLarvalState.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLarvalState.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2023, Arm Limited. All rights reserved. - * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,7 @@ * @library /test/lib * @enablePreview * @modules java.base/jdk.internal.misc - * @run main/othervm compiler.valhalla.inlinetypes.TestLarvalState + * @run main compiler.valhalla.inlinetypes.TestLarvalState */ package compiler.valhalla.inlinetypes; diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestMethodHandles.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestMethodHandles.java index af715ad60e0..ae4e21597a4 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestMethodHandles.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestMethodHandles.java @@ -53,7 +53,7 @@ * @enablePreview * @modules java.base/jdk.internal.value * java.base/jdk.internal.vm.annotation - * @run main/othervm/timeout=450 compiler.valhalla.inlinetypes.TestMethodHandles + * @run main/timeout=450 compiler.valhalla.inlinetypes.TestMethodHandles */ @ForceCompileClassInitializer diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNullableArrays.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNullableArrays.java index eaf8fa197e6..e5b13a989be 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNullableArrays.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNullableArrays.java @@ -55,7 +55,7 @@ * @enablePreview * @modules java.base/jdk.internal.value * java.base/jdk.internal.vm.annotation - * @run main/othervm/timeout=600 compiler.valhalla.inlinetypes.TestNullableArrays + * @run main/timeout=600 compiler.valhalla.inlinetypes.TestNullableArrays */ @ForceCompileClassInitializer diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNullableInlineTypes.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNullableInlineTypes.java index f17c492feb5..2a9e001921d 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNullableInlineTypes.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNullableInlineTypes.java @@ -60,7 +60,7 @@ * @modules java.base/jdk.internal.value * java.base/jdk.internal.vm.annotation * @build test.java.lang.invoke.lib.InstructionHelper - * @run main/othervm/timeout=1000 compiler.valhalla.inlinetypes.TestNullableInlineTypes + * @run main/timeout=1000 compiler.valhalla.inlinetypes.TestNullableInlineTypes */ @ForceCompileClassInitializer diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestOnStackReplacement.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestOnStackReplacement.java index 88768d4d2f1..95f1781ac27 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestOnStackReplacement.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestOnStackReplacement.java @@ -49,7 +49,7 @@ * @enablePreview * @modules java.base/jdk.internal.value * java.base/jdk.internal.vm.annotation - * @run main/othervm/timeout=600 compiler.valhalla.inlinetypes.TestOnStackReplacement + * @run main/timeout=600 compiler.valhalla.inlinetypes.TestOnStackReplacement */ public class TestOnStackReplacement { diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestOopsInReturnConvention.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestOopsInReturnConvention.java index bf1c37fda22..67fe5de9399 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestOopsInReturnConvention.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestOopsInReturnConvention.java @@ -21,59 +21,138 @@ * questions. */ -/** - * @test +/* + * @test id=int * @summary Test that oop fields in scalarized returns are properly handled. * @library /test/lib /compiler/whitebox / * @enablePreview * @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:-TieredCompilation - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify - * TestOopsInReturnConvention Interpreted + * -Xbatch -XX:-TieredCompilation + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify + * compiler.valhalla.inlinetypes.TestOopsInReturnConvention Interpreted + */ + +/* + * @test id=c1 + * @summary Test that oop fields in scalarized returns are properly handled. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @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:CompileCommand=dontinline,TestOopsInReturnConvention::callee * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify - * TestOopsInReturnConvention C1 + * compiler.valhalla.inlinetypes.TestOopsInReturnConvention C1 + */ + +/* + * @test id=c2 + * @summary Test that oop fields in scalarized returns are properly handled. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @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:-TieredCompilation - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify - * TestOopsInReturnConvention C2 + * -Xbatch + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify + * compiler.valhalla.inlinetypes.TestOopsInReturnConvention C2 + */ + +/* + * @test id=int-stress-cc + * @summary Test that oop fields in scalarized returns are properly handled. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @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:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:+StressCallingConvention - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify - * TestOopsInReturnConvention Interpreted + * -Xbatch -XX:-TieredCompilation + * -XX:+IgnoreUnrecognizedVMOptions -XX:+StressCallingConvention + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify + * compiler.valhalla.inlinetypes.TestOopsInReturnConvention Interpreted + */ + +/* + * @test id=c1-stress-cc + * @summary Test that oop fields in scalarized returns are properly handled. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @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:+IgnoreUnrecognizedVMOptions -XX:+StressCallingConvention - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify - * TestOopsInReturnConvention C1 + * -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:+StressCallingConvention + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify + * compiler.valhalla.inlinetypes.TestOopsInReturnConvention C1 + */ + +/* + * @test id=c2-stress-cc + * @summary Test that oop fields in scalarized returns are properly handled. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @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:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:+StressCallingConvention - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify - * TestOopsInReturnConvention C2 + * -Xbatch -XX:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:+StressCallingConvention + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify + * compiler.valhalla.inlinetypes.TestOopsInReturnConvention C2 + */ + +/* + * @test id=int-no-preload + * @summary Test that oop fields in scalarized returns are properly handled. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @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:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:-PreloadClasses - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify - * TestOopsInReturnConvention Interpreted + * -Xbatch -XX:-TieredCompilation + * -XX:+IgnoreUnrecognizedVMOptions -XX:-PreloadClasses + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify + * compiler.valhalla.inlinetypes.TestOopsInReturnConvention Interpreted + */ + +/* + * @test id=c1-no-preload + * @summary Test that oop fields in scalarized returns are properly handled. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @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:+IgnoreUnrecognizedVMOptions -XX:-PreloadClasses - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify - * TestOopsInReturnConvention C1 + * -Xbatch + * -XX:+IgnoreUnrecognizedVMOptions -XX:-PreloadClasses + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify + * compiler.valhalla.inlinetypes.TestOopsInReturnConvention C1 + */ + +/* + * @test id=c2-no-preload + * @summary Test that oop fields in scalarized returns are properly handled. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @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:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:-PreloadClasses - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee - * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify - * TestOopsInReturnConvention C2 - **/ + * -Xbatch -XX:-TieredCompilation + * -XX:+IgnoreUnrecognizedVMOptions -XX:-PreloadClasses + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention::callee + * -XX:CompileCommand=dontinline,TestOopsInReturnConvention*::verify + * compiler.valhalla.inlinetypes.TestOopsInReturnConvention C2 + */ + + +package compiler.valhalla.inlinetypes; import java.lang.reflect.Method; diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestTearing.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestTearing.java index f30847ec85a..685316e9b10 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestTearing.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestTearing.java @@ -35,8 +35,10 @@ import jdk.internal.vm.annotation.NullRestricted; import jdk.internal.vm.annotation.Strict; -/** - * @test id=tiered +// Tiered compilation runs: + +/* + * @test id=no-flattening * @key randomness * @requires vm.compMode != "Xint" & vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4) * @summary Detect tearing on flat accesses and buffering. @@ -48,34 +50,129 @@ * @run main/othervm -XX:-UseFieldFlattening -XX:-UseArrayFlattening * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+StressLCM * compiler.valhalla.inlinetypes.TestTearing + */ + +/* + * @test id=no-flattening-AII + * @key randomness + * @requires vm.compMode != "Xint" & vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4) + * @summary Detect tearing on flat accesses and buffering. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -XX:-UseFieldFlattening -XX:-UseArrayFlattening * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+StressLCM * -XX:+IgnoreUnrecognizedVMOptions -XX:+AlwaysIncrementalInline * compiler.valhalla.inlinetypes.TestTearing + */ + +/* + * @test id=no-flattening-di + * @key randomness + * @requires vm.compMode != "Xint" & vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4) + * @summary Detect tearing on flat accesses and buffering. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -XX:-UseFieldFlattening -XX:-UseArrayFlattening * -XX:CompileCommand=dontinline,*::incrementAndCheck* * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+StressLCM * compiler.valhalla.inlinetypes.TestTearing + */ + +/* + * @test id=no-flattening-di-AII + * @key randomness + * @requires vm.compMode != "Xint" & vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4) + * @summary Detect tearing on flat accesses and buffering. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -XX:-UseFieldFlattening -XX:-UseArrayFlattening * -XX:CompileCommand=dontinline,*::incrementAndCheck* * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+StressLCM * -XX:+IgnoreUnrecognizedVMOptions -XX:+AlwaysIncrementalInline * compiler.valhalla.inlinetypes.TestTearing - * + */ + +/* + * @test id=xcomp-no-stress + * @key randomness + * @requires vm.compMode != "Xint" & vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4) + * @summary Detect tearing on flat accesses and buffering. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm/timeout=1000 -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseArrayFlattening - * -Xcomp -XX:-TieredCompilation - * compiler.valhalla.inlinetypes.TestTearing + * -Xcomp -XX:-TieredCompilation + * compiler.valhalla.inlinetypes.TestTearing + */ + +/* + * @test id=flattening + * @key randomness + * @requires vm.compMode != "Xint" & vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4) + * @summary Detect tearing on flat accesses and buffering. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseArrayFlattening * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+StressLCM * compiler.valhalla.inlinetypes.TestTearing + */ + +/* + * @test id=flattening-AII + * @key randomness + * @requires vm.compMode != "Xint" & vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4) + * @summary Detect tearing on flat accesses and buffering. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseArrayFlattening * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+StressLCM * -XX:+IgnoreUnrecognizedVMOptions -XX:+AlwaysIncrementalInline * compiler.valhalla.inlinetypes.TestTearing + */ + +/* + * @test id=flattening-di + * @key randomness + * @requires vm.compMode != "Xint" & vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4) + * @summary Detect tearing on flat accesses and buffering. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseArrayFlattening * -XX:CompileCommand=dontinline,*::incrementAndCheck* * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+StressLCM * compiler.valhalla.inlinetypes.TestTearing + */ + +/* + * @test id=flattening-di-AII + * @key randomness + * @requires vm.compMode != "Xint" & vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4) + * @summary Detect tearing on flat accesses and buffering. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseArrayFlattening * -XX:CompileCommand=dontinline,*::incrementAndCheck* * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+StressLCM @@ -83,9 +180,11 @@ * compiler.valhalla.inlinetypes.TestTearing */ -/** - * @test id=c1 - * @key randomness + +// C1 only runs: + +/* + * @test id=c1-no-flattening * @requires vm.compMode != "Xint" & (vm.opt.TieredStopAtLevel != null & vm.opt.TieredStopAtLevel < 4) * @summary Detect tearing on flat accesses and buffering. These runs use a much smaller loop limit to avoid timeouts * with C1 only. @@ -95,31 +194,124 @@ * java.base/jdk.internal.value * java.base/jdk.internal.vm.annotation * @run main/othervm -XX:-UseFieldFlattening -XX:-UseArrayFlattening - * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+StressLCM * compiler.valhalla.inlinetypes.TestTearing C1 + */ + +/* + * @test id=c1-no-flattening-AII + * @requires vm.compMode != "Xint" & (vm.opt.TieredStopAtLevel != null & vm.opt.TieredStopAtLevel < 4) + * @summary Detect tearing on flat accesses and buffering. These runs use a much smaller loop limit to avoid timeouts + * with C1 only. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -XX:-UseFieldFlattening -XX:-UseArrayFlattening - * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+StressLCM * -XX:+IgnoreUnrecognizedVMOptions -XX:+AlwaysIncrementalInline * compiler.valhalla.inlinetypes.TestTearing C1 + */ + +/* + * @test id=c1-no-flattening-di + * @requires vm.compMode != "Xint" & (vm.opt.TieredStopAtLevel != null & vm.opt.TieredStopAtLevel < 4) + * @summary Detect tearing on flat accesses and buffering. These runs use a much smaller loop limit to avoid timeouts + * with C1 only. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -XX:-UseFieldFlattening -XX:-UseArrayFlattening * -XX:CompileCommand=dontinline,*::incrementAndCheck* - * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+StressLCM * compiler.valhalla.inlinetypes.TestTearing C1 + */ + +/* + * @test id=c1-no-flattening-di-AII + * @requires vm.compMode != "Xint" & (vm.opt.TieredStopAtLevel != null & vm.opt.TieredStopAtLevel < 4) + * @summary Detect tearing on flat accesses and buffering. These runs use a much smaller loop limit to avoid timeouts + * with C1 only. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -XX:-UseFieldFlattening -XX:-UseArrayFlattening * -XX:CompileCommand=dontinline,*::incrementAndCheck* - * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+StressLCM * -XX:+IgnoreUnrecognizedVMOptions -XX:+AlwaysIncrementalInline * compiler.valhalla.inlinetypes.TestTearing C1 - * + */ + +/* + * @test id=c1-xcomp + * @requires vm.compMode != "Xint" & (vm.opt.TieredStopAtLevel != null & vm.opt.TieredStopAtLevel < 4) + * @summary Detect tearing on flat accesses and buffering. These runs use a much smaller loop limit to avoid timeouts + * with C1 only. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm/timeout=1000 -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseArrayFlattening - * -Xcomp compiler.valhalla.inlinetypes.TestTearing C1 + * -Xcomp -XX:-TieredCompilation + * compiler.valhalla.inlinetypes.TestTearing C1 + */ + +/* + * @test id=c1-flattening + * @requires vm.compMode != "Xint" & (vm.opt.TieredStopAtLevel != null & vm.opt.TieredStopAtLevel < 4) + * @summary Detect tearing on flat accesses and buffering. These runs use a much smaller loop limit to avoid timeouts + * with C1 only. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseArrayFlattening + * compiler.valhalla.inlinetypes.TestTearing C1 + */ + +/* + * @test id=c1-flattening-AII + * @requires vm.compMode != "Xint" & (vm.opt.TieredStopAtLevel != null & vm.opt.TieredStopAtLevel < 4) + * @summary Detect tearing on flat accesses and buffering. These runs use a much smaller loop limit to avoid timeouts + * with C1 only. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseArrayFlattening - * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+StressLCM * -XX:+IgnoreUnrecognizedVMOptions -XX:+AlwaysIncrementalInline * compiler.valhalla.inlinetypes.TestTearing C1 + */ + +/* + * @test id=c1-flattening-di + * @requires vm.compMode != "Xint" & (vm.opt.TieredStopAtLevel != null & vm.opt.TieredStopAtLevel < 4) + * @summary Detect tearing on flat accesses and buffering. These runs use a much smaller loop limit to avoid timeouts + * with C1 only. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseArrayFlattening * -XX:CompileCommand=dontinline,*::incrementAndCheck* * compiler.valhalla.inlinetypes.TestTearing C1 + */ + +/* + * @test id=c1-flattening-di-AII + * @requires vm.compMode != "Xint" & (vm.opt.TieredStopAtLevel != null & vm.opt.TieredStopAtLevel < 4) + * @summary Detect tearing on flat accesses and buffering. These runs use a much smaller loop limit to avoid timeouts + * with C1 only. + * @library /testlibrary /test/lib / + * @enablePreview + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -XX:+UseNullableValueFlattening -XX:+UseAtomicValueFlattening -XX:+UseArrayFlattening * -XX:CompileCommand=dontinline,*::incrementAndCheck* * -XX:+IgnoreUnrecognizedVMOptions -XX:+AlwaysIncrementalInline diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnexpectedMemBar.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnexpectedMemBar.java index f3d00a38ed3..6e976d52dfd 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnexpectedMemBar.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnexpectedMemBar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,8 +21,8 @@ * questions. */ -/** - * @test +/* + * @test id=AII-fixed-seed * @bug 8270995 * @summary Membars of non-escaping value class buffer allocations should be removed. * @library /test/lib / @@ -32,11 +32,27 @@ * -XX:+AlwaysIncrementalInline -Xbatch -XX:CompileCommand=compileonly,*TestUnexpectedMemBar::test* * -XX:+StressIGVN -XX:+StressGCM -XX:+StressLCM -XX:StressSeed=851121348 * compiler.valhalla.inlinetypes.TestUnexpectedMemBar + */ + +/* + * @test id=AII- + * @bug 8270995 + * @summary Membars of non-escaping value class buffer allocations should be removed. + * @library /test/lib / + * @enablePreview * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions * -XX:-TieredCompilation -XX:-ReduceInitialCardMarks -XX:+AlwaysIncrementalInline * -Xbatch -XX:CompileCommand=compileonly,*TestUnexpectedMemBar::test* * -XX:+StressIGVN -XX:+StressGCM -XX:+StressLCM * compiler.valhalla.inlinetypes.TestUnexpectedMemBar + */ + +/* + * @test id=default + * @bug 8270995 + * @summary Membars of non-escaping value class buffer allocations should be removed. + * @library /test/lib / + * @enablePreview * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions * -Xbatch -XX:CompileCommand=compileonly,*TestUnexpectedMemBar::test* * -XX:+StressIGVN -XX:+StressGCM -XX:+StressLCM diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnloadedInlineTypeArray.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnloadedInlineTypeArray.java index 73e3d2240da..7ae5a05665c 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnloadedInlineTypeArray.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnloadedInlineTypeArray.java @@ -22,8 +22,8 @@ * questions. */ -/** - * @test +/* + * @test id=default * @bug 8182997 8214898 * @library /test/lib * @summary Test the handling of arrays of unloaded value classes. @@ -33,21 +33,90 @@ * @run main/othervm -Xcomp * -XX:CompileCommand=compileonly,TestUnloadedInlineTypeArray::test* * TestUnloadedInlineTypeArray + */ + +/* + * @test id=no-flattening + * @bug 8182997 8214898 + * @library /test/lib + * @summary Test the handling of arrays of unloaded value classes. + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -Xcomp -XX:-UseArrayFlattening * -XX:CompileCommand=compileonly,TestUnloadedInlineTypeArray::test* * TestUnloadedInlineTypeArray - * @run main/othervm -Xcomp - * TestUnloadedInlineTypeArray + */ + +/* + * @test id=xcomp + * @bug 8182997 8214898 + * @library /test/lib + * @summary Test the handling of arrays of unloaded value classes. + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation + * @run main/othervm -Xcomp TestUnloadedInlineTypeArray + */ + +/* + * @test id=xcomp-no-flattening + * @bug 8182997 8214898 + * @library /test/lib + * @summary Test the handling of arrays of unloaded value classes. + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -Xcomp -XX:-UseArrayFlattening * TestUnloadedInlineTypeArray + */ + +/* + * @test id=c2 + * @bug 8182997 8214898 + * @library /test/lib + * @summary Test the handling of arrays of unloaded value classes. + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -Xcomp -XX:-TieredCompilation * -XX:CompileCommand=compileonly,TestUnloadedInlineTypeArray::test* * TestUnloadedInlineTypeArray + */ + +/* + * @test id=c2-no-flattening + * @bug 8182997 8214898 + * @library /test/lib + * @summary Test the handling of arrays of unloaded value classes. + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -Xcomp -XX:-TieredCompilation -XX:-UseArrayFlattening * -XX:CompileCommand=compileonly,TestUnloadedInlineTypeArray::test* * TestUnloadedInlineTypeArray + */ + +/* + * @test id=xcomp-c2 + * @bug 8182997 8214898 + * @library /test/lib + * @summary Test the handling of arrays of unloaded value classes. + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -Xcomp -XX:-TieredCompilation * TestUnloadedInlineTypeArray + */ + +/* + * @test id=xcomp-c2-no-flattening + * @bug 8182997 8214898 + * @library /test/lib + * @summary Test the handling of arrays of unloaded value classes. + * @enablePreview + * @modules java.base/jdk.internal.value + * java.base/jdk.internal.vm.annotation * @run main/othervm -Xcomp -XX:-TieredCompilation -XX:-UseArrayFlattening * TestUnloadedInlineTypeArray */ diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnresolvedInlineClass.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnresolvedInlineClass.java index 431bf20a5a4..e106508bcb9 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnresolvedInlineClass.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnresolvedInlineClass.java @@ -29,7 +29,7 @@ * @requires vm.flagless * @library /test/lib * @compile SimpleInlineType.java TestUnresolvedInlineClass.java - * @run main/othervm TestUnresolvedInlineClass + * @run main TestUnresolvedInlineClass */ import java.io.File; diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestValueClasses.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestValueClasses.java index 9a9e6c3cd60..fd129c62466 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestValueClasses.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestValueClasses.java @@ -47,7 +47,7 @@ * @enablePreview * @modules java.base/jdk.internal.value * java.base/jdk.internal.vm.annotation - * @run main/othervm/timeout=300 compiler.valhalla.inlinetypes.TestValueClasses + * @run main/timeout=300 compiler.valhalla.inlinetypes.TestValueClasses */ @ForceCompileClassInitializer diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestValueRematDuringTypeSharpening.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestValueRematDuringTypeSharpening.java index 0cb099a0e00..2a6f6f8e420 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestValueRematDuringTypeSharpening.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestValueRematDuringTypeSharpening.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,7 @@ * @library /test/lib / * @enablePreview * @modules java.base/jdk.internal.misc - * @run main/othervm/timeout=300 compiler.valhalla.inlinetypes.TestValueRematDuringTypeSharpening + * @run main/timeout=300 compiler.valhalla.inlinetypes.TestValueRematDuringTypeSharpening */ abstract value class topValue { diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestVirtualThreads.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestVirtualThreads.java index 44cc5f6b722..3596381efb8 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestVirtualThreads.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestVirtualThreads.java @@ -21,8 +21,8 @@ * questions. */ -/** - * @test +/* + * @test id=default * @key randomness * @summary Test that Virtual Threads work well with Value Objects. * @library /test/lib /compiler/whitebox / @@ -30,45 +30,180 @@ * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * TestVirtualThreads - * + * compiler.valhalla.inlinetypes.TestVirtualThreads + */ + +/* + * @test id=ci + * @key randomness + * @summary Test that Virtual Threads work well with Value Objects. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -Xbatch -XX:CompileCommand=compileonly,TestVirtualThreads*::* - * TestVirtualThreads + * compiler.valhalla.inlinetypes.TestVirtualThreads + */ + +/* + * @test id=ci-test + * @key randomness + * @summary Test that Virtual Threads work well with Value Objects. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -Xbatch -XX:CompileCommand=compileonly,TestVirtualThreads*::test* - * TestVirtualThreads + * -Xbatch -XX:CompileCommand=compileonly,TestVirtualThreads*::test* + * compiler.valhalla.inlinetypes.TestVirtualThreads + */ + +/* + * @test id=ci-test-di + * @key randomness + * @summary Test that Virtual Threads work well with Value Objects. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -Xbatch -XX:CompileCommand=dontinline,*::dontinline -XX:CompileCommand=compileonly,TestVirtualThreads*::test* -XX:CompileCommand=dontinline,*::test* - * TestVirtualThreads + * -Xbatch -XX:CompileCommand=dontinline,*::dontinline + * -XX:CompileCommand=compileonly,TestVirtualThreads*::test* + * -XX:CompileCommand=dontinline,*::test* + * compiler.valhalla.inlinetypes.TestVirtualThreads + */ + +/* + * @test id=ci-test-di-helper + * @key randomness + * @summary Test that Virtual Threads work well with Value Objects. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -Xbatch -XX:CompileCommand=dontinline,*::dontinline -XX:CompileCommand=compileonly,TestVirtualThreads*::test* -XX:CompileCommand=dontinline,*::*Helper - * TestVirtualThreads + * -Xbatch -XX:CompileCommand=dontinline,*::dontinline + * -XX:CompileCommand=compileonly,TestVirtualThreads*::test* + * -XX:CompileCommand=dontinline,*::*Helper + * compiler.valhalla.inlinetypes.TestVirtualThreads + */ + +/* + * @test id=ci-test-di-exclude-helper + * @key randomness + * @summary Test that Virtual Threads work well with Value Objects. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -Xbatch -XX:CompileCommand=dontinline,*::dontinline -XX:CompileCommand=compileonly,TestVirtualThreads*::test* -XX:CompileCommand=exclude,*::*Helper - * TestVirtualThreads + * -Xbatch -XX:CompileCommand=dontinline,*::dontinline + * -XX:CompileCommand=compileonly,TestVirtualThreads*::test* + * -XX:CompileCommand=exclude,*::*Helper + * compiler.valhalla.inlinetypes.TestVirtualThreads + */ + +/* + * @test id=xcomp-ci + * @key randomness + * @summary Test that Virtual Threads work well with Value Objects. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -Xcomp -XX:CompileCommand=compileonly,TestVirtualThreads*::* - * TestVirtualThreads + * -Xcomp -XX:CompileCommand=compileonly,TestVirtualThreads*::* + * compiler.valhalla.inlinetypes.TestVirtualThreads + */ + +/* + * @test id=xcomp-co-test + * @key randomness + * @summary Test that Virtual Threads work well with Value Objects. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -Xcomp -XX:CompileCommand=compileonly,TestVirtualThreads*::test* - * TestVirtualThreads + * -Xcomp -XX:CompileCommand=compileonly,TestVirtualThreads*::test* + * compiler.valhalla.inlinetypes.TestVirtualThreads + */ + +/* + * @test id=xcomp-co-test-di + * @key randomness + * @summary Test that Virtual Threads work well with Value Objects. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -Xcomp -XX:CompileCommand=dontinline,*::dontinline -XX:CompileCommand=compileonly,TestVirtualThreads*::test* -XX:CompileCommand=dontinline,*::test* - * TestVirtualThreads + * -Xcomp -XX:CompileCommand=dontinline,*::dontinline + * -XX:CompileCommand=compileonly,TestVirtualThreads*::test* + * -XX:CompileCommand=dontinline,*::test* + * compiler.valhalla.inlinetypes.TestVirtualThreads + */ + +/* + * @test id=xcomp-co-test-di-helper + * @key randomness + * @summary Test that Virtual Threads work well with Value Objects. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -Xcomp -XX:CompileCommand=dontinline,*::dontinline -XX:CompileCommand=compileonly,TestVirtualThreads*::test* -XX:CompileCommand=dontinline,*::*Helper - * TestVirtualThreads + * -Xcomp -XX:CompileCommand=dontinline,*::dontinline + * -XX:CompileCommand=compileonly,TestVirtualThreads*::test* + * -XX:CompileCommand=dontinline,*::*Helper + * compiler.valhalla.inlinetypes.TestVirtualThreads + */ + +/* + * @test id=xcomp-co-test-di-exclude-helper + * @key randomness + * @summary Test that Virtual Threads work well with Value Objects. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -Xcomp -XX:CompileCommand=dontinline,*::dontinline -XX:CompileCommand=compileonly,TestVirtualThreads*::test* -XX:CompileCommand=exclude,*::*Helper - * TestVirtualThreads + * -Xcomp -XX:CompileCommand=dontinline,*::dontinline + * -XX:CompileCommand=compileonly,TestVirtualThreads*::test* + * -XX:CompileCommand=exclude,*::*Helper + * compiler.valhalla.inlinetypes.TestVirtualThreads + */ + +/* + * @test id=co-di + * @key randomness + * @summary Test that Virtual Threads work well with Value Objects. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -Xbatch -XX:CompileCommand=dontinline,*::* -XX:CompileCommand=compileonly,TestVirtualThreads*::* - * TestVirtualThreads 250000 + * -Xbatch -XX:CompileCommand=dontinline,*::* + * -XX:CompileCommand=compileonly,TestVirtualThreads*::* + * compiler.valhalla.inlinetypes.TestVirtualThreads 250000 + */ + +/* + * @test id=xcomp-co-di + * @key randomness + * @summary Test that Virtual Threads work well with Value Objects. + * @library /test/lib /compiler/whitebox / + * @enablePreview + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -Xcomp -XX:CompileCommand=dontinline,*::* -XX:CompileCommand=compileonly,TestVirtualThreads*::* - * TestVirtualThreads 250000 - **/ + * -Xcomp -XX:CompileCommand=dontinline,*::* + * -XX:CompileCommand=compileonly,TestVirtualThreads*::* + * compiler.valhalla.inlinetypes.TestVirtualThreads 250000 + */ + +package compiler.valhalla.inlinetypes; import java.lang.reflect.Method; From da6df6ee459dffbff73b1bf27c9880c8092467f6 Mon Sep 17 00:00:00 2001 From: Christian Hagedorn Date: Wed, 15 Oct 2025 15:56:27 +0200 Subject: [PATCH 2/2] review Paul --- .../compiler/valhalla/inlinetypes/TestUnexpectedMemBar.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnexpectedMemBar.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnexpectedMemBar.java index 6e976d52dfd..418fe49d38a 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnexpectedMemBar.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnexpectedMemBar.java @@ -35,7 +35,7 @@ */ /* - * @test id=AII- + * @test id=AII * @bug 8270995 * @summary Membars of non-escaping value class buffer allocations should be removed. * @library /test/lib /