Skip to content

Commit c71c268

Browse files
committed
8266165: TestNoWarningLoopStripMiningIterSet is runnable only on VM w/ G1, Shenandoah, Z and Epsilon
Reviewed-by: roland
1 parent 8954bef commit c71c268

File tree

1 file changed

+42
-9
lines changed

1 file changed

+42
-9
lines changed

test/hotspot/jtreg/compiler/loopstripmining/TestNoWarningLoopStripMiningIterSet.java

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,50 @@
2222
*/
2323

2424
/*
25-
* @test
25+
* @test id=G1
2626
* @bug 8241486
2727
* @summary G1/Z give warning when using LoopStripMiningIter and turn off LoopStripMiningIter (0)
2828
* @requires vm.flagless
2929
* @requires vm.flavor == "server" & !vm.graal.enabled
30-
* @requires vm.gc.G1 & vm.gc.Shenandoah & vm.gc.Z & vm.gc.Epsilon
30+
* @requires vm.gc.G1
3131
* @library /test/lib
32-
* @run driver TestNoWarningLoopStripMiningIterSet
32+
* @run driver TestNoWarningLoopStripMiningIterSet G1
3333
*/
3434

35+
/*
36+
* @test id=Shenandoah
37+
* @bug 8241486
38+
* @summary G1/Z give warning when using LoopStripMiningIter and turn off LoopStripMiningIter (0)
39+
* @requires vm.flagless
40+
* @requires vm.flavor == "server" & !vm.graal.enabled
41+
* @requires vm.gc.Shenandoah
42+
* @library /test/lib
43+
* @run driver TestNoWarningLoopStripMiningIterSet Shenandoah
44+
*/
45+
46+
/*
47+
* @test id=Z
48+
* @bug 8241486
49+
* @summary G1/Z give warning when using LoopStripMiningIter and turn off LoopStripMiningIter (0)
50+
* @requires vm.flagless
51+
* @requires vm.flavor == "server" & !vm.graal.enabled
52+
* @requires vm.gc.Z
53+
* @library /test/lib
54+
* @run driver TestNoWarningLoopStripMiningIterSet Z
55+
*/
56+
57+
/*
58+
* @test id=Epsilon
59+
* @bug 8241486
60+
* @summary G1/Z give warning when using LoopStripMiningIter and turn off LoopStripMiningIter (0)
61+
* @requires vm.flagless
62+
* @requires vm.flavor == "server" & !vm.graal.enabled
63+
* @requires vm.gc.Epsilon
64+
* @library /test/lib
65+
* @run driver TestNoWarningLoopStripMiningIterSet Epsilon
66+
*/
67+
68+
3569
import jdk.test.lib.Asserts;
3670
import jdk.test.lib.process.ProcessTools;
3771
import jdk.test.lib.process.OutputAnalyzer;
@@ -60,11 +94,10 @@ public static void testWith(Consumer<OutputAnalyzer> check, String msg, boolean
6094
}
6195

6296
public static void main(String[] args) throws Exception {
63-
for (String gc : List.of("-XX:+UseG1GC", "-XX:+UseZGC", "-XX:+UseShenandoahGC", "-XX:+UseEpsilonGC")) {
64-
testWith(output -> output.shouldNotContain(CLSOffLSMGreaterZero), "should have CLS and LSM enabled", true, 100, "-XX:LoopStripMiningIter=100", gc);
65-
testWith(output -> output.shouldContain(CLSOffLSMGreaterZero), "should have CLS and LSM disabled", false, 0, "-XX:-UseCountedLoopSafepoints", "-XX:LoopStripMiningIter=100", gc);
66-
testWith(output -> output.shouldContain(CLSOnLSMEqualZero), "should have CLS and LSM enabled", true, 1, "-XX:LoopStripMiningIter=0", gc);
67-
testWith(output -> output.shouldNotContain(CLSOnLSMEqualZero), "should have CLS and LSM disabled", false, 0, "-XX:-UseCountedLoopSafepoints", "-XX:LoopStripMiningIter=0", gc);
68-
}
97+
String gc = "-XX:+Use" + args[0] + "GC";
98+
testWith(output -> output.shouldNotContain(CLSOffLSMGreaterZero), "should have CLS and LSM enabled", true, 100, "-XX:LoopStripMiningIter=100", gc);
99+
testWith(output -> output.shouldContain(CLSOffLSMGreaterZero), "should have CLS and LSM disabled", false, 0, "-XX:-UseCountedLoopSafepoints", "-XX:LoopStripMiningIter=100", gc);
100+
testWith(output -> output.shouldContain(CLSOnLSMEqualZero), "should have CLS and LSM enabled", true, 1, "-XX:LoopStripMiningIter=0", gc);
101+
testWith(output -> output.shouldNotContain(CLSOnLSMEqualZero), "should have CLS and LSM disabled", false, 0, "-XX:-UseCountedLoopSafepoints", "-XX:LoopStripMiningIter=0", gc);
69102
}
70103
}

0 commit comments

Comments
 (0)