|
24 | 24 | /* |
25 | 25 | * @test id=c1_crash |
26 | 26 | * @requires vm.compiler1.enabled |
27 | | - * @summary Checks that -XX:CompileCommand=MemLimit,...,crash causes compilation to crash |
| 27 | + * @summary Checks that -XX:CompileCommand=MemLimit,...,crash causes C1 to crash |
28 | 28 | * @library /test/lib |
29 | 29 | * @run driver compiler.print.CompileCommandMemLimit crash false |
30 | 30 | */ |
31 | 31 |
|
32 | 32 | /* |
33 | 33 | * @test id=c2_crash |
34 | 34 | * @requires vm.compiler2.enabled |
35 | | - * @summary Checks that -XX:CompileCommand=MemLimit,...,crash causes compilation to crash |
| 35 | + * @summary Checks that -XX:CompileCommand=MemLimit,...,crash causes C2 to crash |
36 | 36 | * @library /test/lib |
37 | 37 | * @run driver compiler.print.CompileCommandMemLimit crash true |
38 | 38 | */ |
39 | 39 |
|
40 | 40 | /* |
41 | 41 | * @test id=c1_stop |
42 | 42 | * @requires vm.compiler1.enabled |
43 | | - * @summary Checks that -XX:CompileCommand=MemLimit,...,stop causes compilation to stop |
| 43 | + * @summary Checks that -XX:CompileCommand=MemLimit,...,stop causes C1 to stop |
44 | 44 | * @library /test/lib |
45 | 45 | * @run driver compiler.print.CompileCommandMemLimit stop false |
46 | 46 | */ |
47 | 47 |
|
48 | 48 | /* |
49 | 49 | * @test id=c2_stop |
50 | 50 | * @requires vm.compiler2.enabled |
51 | | - * @summary Checks that -XX:CompileCommand=MemLimit,...,stop causes compilation to stop |
| 51 | + * @summary Checks that -XX:CompileCommand=MemLimit,...,stop causes C2 to stop |
52 | 52 | * @library /test/lib |
53 | 53 | * @run driver compiler.print.CompileCommandMemLimit stop true |
54 | 54 | */ |
@@ -87,10 +87,17 @@ private static void test(String include, String exclude) throws Exception { |
87 | 87 | List<String> options = new ArrayList<String>(); |
88 | 88 | options.add("-Xcomp"); |
89 | 89 | options.add("-XX:-Inline"); |
| 90 | + options.add("-Xmx100m"); |
90 | 91 | options.add("-XX:CompileCommand=compileonly," + getTestClass() + "::*"); |
91 | 92 | // We pass a very small size to guarantee the crash |
92 | 93 | options.add("-XX:CompileCommand=MemStat," + getTestMethod(include) + ",print"); |
93 | | - options.add("-XX:CompileCommand=MemLimit," + getTestMethod(include) + ",4k" + (test_crash ? "~crash" : "")); |
| 94 | + if (test_crash) { |
| 95 | + options.add("-XX:CompileCommand=MemLimit," + getTestMethod(include) + ",4k~crash"); |
| 96 | + options.add("-XX:-CreateCoredumpOnCrash"); |
| 97 | + } else { |
| 98 | + options.add("-XX:CompileCommand=MemLimit," + getTestMethod(include) + ",4k"); |
| 99 | + } |
| 100 | + |
94 | 101 | if (c2) { |
95 | 102 | options.add("-XX:-TieredCompilation"); |
96 | 103 | } else { |
|
0 commit comments