|
22 | 22 | */
|
23 | 23 |
|
24 | 24 | /*
|
25 |
| - * @test |
| 25 | + * @test id=G1 |
26 | 26 | * @bug 8241486
|
27 | 27 | * @summary G1/Z give warning when using LoopStripMiningIter and turn off LoopStripMiningIter (0)
|
28 | 28 | * @requires vm.flagless
|
29 | 29 | * @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 |
31 | 31 | * @library /test/lib
|
32 |
| - * @run driver TestNoWarningLoopStripMiningIterSet |
| 32 | + * @run driver TestNoWarningLoopStripMiningIterSet G1 |
33 | 33 | */
|
34 | 34 |
|
| 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 | + |
35 | 69 | import jdk.test.lib.Asserts;
|
36 | 70 | import jdk.test.lib.process.ProcessTools;
|
37 | 71 | import jdk.test.lib.process.OutputAnalyzer;
|
@@ -60,11 +94,10 @@ public static void testWith(Consumer<OutputAnalyzer> check, String msg, boolean
|
60 | 94 | }
|
61 | 95 |
|
62 | 96 | 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); |
69 | 102 | }
|
70 | 103 | }
|
0 commit comments