Skip to content

Commit b3126b6

Browse files
committed
8319455: Test compiler/print/CompileCommandMemLimit.java times out
Reviewed-by: thartmann, chagedorn
1 parent 1c2ea1d commit b3126b6

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

test/hotspot/jtreg/compiler/print/CompileCommandMemLimit.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,31 @@
2424
/*
2525
* @test id=c1_crash
2626
* @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
2828
* @library /test/lib
2929
* @run driver compiler.print.CompileCommandMemLimit crash false
3030
*/
3131

3232
/*
3333
* @test id=c2_crash
3434
* @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
3636
* @library /test/lib
3737
* @run driver compiler.print.CompileCommandMemLimit crash true
3838
*/
3939

4040
/*
4141
* @test id=c1_stop
4242
* @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
4444
* @library /test/lib
4545
* @run driver compiler.print.CompileCommandMemLimit stop false
4646
*/
4747

4848
/*
4949
* @test id=c2_stop
5050
* @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
5252
* @library /test/lib
5353
* @run driver compiler.print.CompileCommandMemLimit stop true
5454
*/
@@ -87,10 +87,17 @@ private static void test(String include, String exclude) throws Exception {
8787
List<String> options = new ArrayList<String>();
8888
options.add("-Xcomp");
8989
options.add("-XX:-Inline");
90+
options.add("-Xmx100m");
9091
options.add("-XX:CompileCommand=compileonly," + getTestClass() + "::*");
9192
// We pass a very small size to guarantee the crash
9293
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+
94101
if (c2) {
95102
options.add("-XX:-TieredCompilation");
96103
} else {

0 commit comments

Comments
 (0)