Skip to content

Commit

Permalink
8287801: Fix test-bugs related to stress flags
Browse files Browse the repository at this point in the history
Reviewed-by: chagedorn, thartmann
  • Loading branch information
eme64 committed Jun 20, 2022
1 parent a7df5a4 commit 302a6c0
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:TypeProfileLevel=020
* -XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=5000 -XX:PerMethodTrapLimit=100
* compiler.arraycopy.TestArrayCopyNoInitDeopt
*/

Expand Down
2 changes: 2 additions & 0 deletions test/hotspot/jtreg/compiler/c2/cr7200264/TestDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ private List<String> executeApplication() throws Throwable {
"-XX:-TieredCompilation",
"-XX:+PrintCompilation",
"-XX:+TraceNewVectors",
"-XX:+IgnoreUnrecognizedVMOptions",
"-XX:StressLongCountedLoop=0", // make sure int loops do not get converted to long
TestIntVect.class.getName());
outputAnalyzer.shouldHaveExitValue(0);
return outputAnalyzer.asLines();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
* @requires vm.cpu.features ~= ".*sse2.*" & vm.debug & vm.flavor == "server"
* @requires !vm.emulatedClient & !vm.graal.enabled
* @library /test/lib /
* @run driver compiler.c2.cr7200264.TestSSE2IntVect
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:StressLongCountedLoop=0
* compiler.c2.cr7200264.TestSSE2IntVect
*/

package compiler.c2.cr7200264;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
* @requires vm.cpu.features ~= ".*sse4\\.1.*" & vm.debug & vm.flavor == "server"
* @requires !vm.emulatedClient & !vm.graal.enabled
* @library /test/lib /
* @run driver compiler.c2.cr7200264.TestSSE4IntVect
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:StressLongCountedLoop=0
* compiler.c2.cr7200264.TestSSE4IntVect
*/

package compiler.c2.cr7200264;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class BlackholeStoreStoreEATest {

public static void main(String[] args) {
TestFramework.runWithFlags(
"-XX:+UseTLAB",
"-XX:+UnlockExperimentalVMOptions",
"-XX:CompileCommand=blackhole,compiler.c2.irTests.blackhole.BlackholeStoreStoreEATest::blackhole"
);
Expand Down
2 changes: 2 additions & 0 deletions test/hotspot/jtreg/compiler/cha/AbstractRootMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
* -XX:CompileCommand=compileonly,*::test -XX:CompileCommand=dontinline,*::test
* -Xbatch -Xmixed -XX:+WhiteBoxAPI
* -XX:-TieredCompilation
* -XX:-StressMethodHandleLinkerInlining
* compiler.cha.AbstractRootMethod
*
* @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
Expand All @@ -46,6 +47,7 @@
* -XX:CompileCommand=compileonly,*::test -XX:CompileCommand=dontinline,*::test
* -Xbatch -Xmixed -XX:+WhiteBoxAPI
* -XX:+TieredCompilation -XX:TieredStopAtLevel=1
* -XX:-StressMethodHandleLinkerInlining
* compiler.cha.AbstractRootMethod
*/
package compiler.cha;
Expand Down
2 changes: 2 additions & 0 deletions test/hotspot/jtreg/compiler/cha/DefaultRootMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
* -XX:CompileCommand=compileonly,*::test -XX:CompileCommand=dontinline,*::test
* -Xbatch -Xmixed -XX:+WhiteBoxAPI
* -XX:-TieredCompilation
* -XX:-StressMethodHandleLinkerInlining
* compiler.cha.DefaultRootMethod
*
* @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
Expand All @@ -46,6 +47,7 @@
* -XX:CompileCommand=compileonly,*::test -XX:CompileCommand=dontinline,*::test
* -Xbatch -Xmixed -XX:+WhiteBoxAPI
* -XX:+TieredCompilation -XX:TieredStopAtLevel=1
* -XX:-StressMethodHandleLinkerInlining
* compiler.cha.DefaultRootMethod
*/
package compiler.cha;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
* @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -Xmixed -XX:-BackgroundCompilation -XX:-TieredCompilation -XX:CompileThreshold=1000
* -XX:+UnlockExperimentalVMOptions -XX:PerMethodTrapLimit=100 -XX:-StressReflectiveCode
* -XX:+UncommonNullCast -XX:-StressMethodHandleLinkerInlining -XX:TypeProfileLevel=0
* -XX:CompileCommand=exclude,compiler.intrinsics.klass.CastNullCheckDroppingsTest::runTest
* compiler.intrinsics.klass.CastNullCheckDroppingsTest
*/
Expand Down Expand Up @@ -356,7 +358,7 @@ static void checkDeoptimization(List<RecordedEvent> events, int compilerId, bool
if (exist != mustExist) {
System.err.println("events:");
System.err.println(events);
throw new AssertionError("compilation must " + (mustExist ? "" : " not ") + " got deoptimized");
throw new AssertionError("compilation must " + (mustExist ? "" : " not ") + " get deoptimized");
}

if (mustExist && events.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Xbatch -XX:CompileThresholdScaling=1.0
* -XX:CompileCommand=dontinline,compiler.jvmci.common.testcases.SimpleClass::testMethod
* compiler.jvmci.compilerToVM.IsMatureVsReprofileTest
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
* -Xmixed -Xbatch
* -XX:TypeProfileLevel=0
* compiler.jvmci.compilerToVM.ReprofileTest
*/

Expand Down
2 changes: 2 additions & 0 deletions test/hotspot/jtreg/compiler/profiling/TestTypeProfiling.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@
* -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
* -XX:CompileThreshold=10000
* -server -XX:-TieredCompilation -XX:TypeProfileLevel=020
* -XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=5000 -XX:PerMethodTrapLimit=100
* compiler.profiling.TestTypeProfiling
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
* -XX:CompileThreshold=10000
* -server -XX:-TieredCompilation -XX:TypeProfileLevel=200
* -XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=5000 -XX:PerMethodTrapLimit=100
* compiler.profiling.TestTypeProfiling
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -ea -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
* -XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=5000 -XX:PerMethodTrapLimit=100
* -XX:CompileCommand=compileonly,compiler.rangechecks.TestExplicitRangeChecks::test*
* compiler.rangechecks.TestExplicitRangeChecks
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
* @build sun.hotspot.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox
*
* @run main/othervm -ea -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-BackgroundCompilation -XX:-UseOnStackReplacement TestLongRangeCheck
* @run main/othervm -ea -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
* -XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=5000 -XX:PerMethodTrapLimit=100
* TestLongRangeCheck
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @requires vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4)
* @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -ea -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
Expand Down
2 changes: 2 additions & 0 deletions test/hotspot/jtreg/compiler/uncommontrap/Decompile.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -Xbatch -XX:-UseOnStackReplacement -XX:-TieredCompilation
* -XX:+UnlockExperimentalVMOptions -XX:PerMethodTrapLimit=100 -XX:PerBytecodeTrapLimit=4
* -XX:TypeProfileLevel=0
* -XX:CompileCommand=compileonly,compiler.uncommontrap.Decompile::uncommonTrap
* -XX:CompileCommand=inline,compiler.uncommontrap.Decompile*::foo
* compiler.uncommontrap.Decompile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,25 @@
* @build sun.hotspot.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+UnlockExperimentalVMOptions -XX:PerMethodTrapLimit=100
* -XX:+WhiteBoxAPI -XX:+LogCompilation
* -XX:CompileCommand=compileonly,UnstableIfExecutable.test
* -XX:LogFile=always_taken_not_fired.xml
* compiler.uncommontrap.TestUnstableIfTrap ALWAYS_TAKEN false
* @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+UnlockExperimentalVMOptions -XX:PerMethodTrapLimit=100
* -XX:+WhiteBoxAPI -XX:+LogCompilation
* -XX:CompileCommand=compileonly,UnstableIfExecutable.test
* -XX:LogFile=always_taken_fired.xml
* compiler.uncommontrap.TestUnstableIfTrap ALWAYS_TAKEN true
* @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+UnlockExperimentalVMOptions -XX:PerMethodTrapLimit=100
* -XX:+WhiteBoxAPI -XX:+LogCompilation
* -XX:CompileCommand=compileonly,UnstableIfExecutable.test
* -XX:LogFile=never_taken_not_fired.xml
* compiler.uncommontrap.TestUnstableIfTrap NEVER_TAKEN false
* @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+UnlockExperimentalVMOptions -XX:PerMethodTrapLimit=100
* -XX:+WhiteBoxAPI -XX:+LogCompilation
* -XX:CompileCommand=compileonly,UnstableIfExecutable.test
* -XX:LogFile=never_taken_fired.xml
Expand Down

1 comment on commit 302a6c0

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.