Skip to content

Commit

Permalink
8319455: Test compiler/print/CompileCommandMemLimit.java times out
Browse files Browse the repository at this point in the history
Reviewed-by: thartmann, chagedorn
  • Loading branch information
tstuefe committed Nov 6, 2023
1 parent 1c2ea1d commit b3126b6
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions test/hotspot/jtreg/compiler/print/CompileCommandMemLimit.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@
/*
* @test id=c1_crash
* @requires vm.compiler1.enabled
* @summary Checks that -XX:CompileCommand=MemLimit,...,crash causes compilation to crash
* @summary Checks that -XX:CompileCommand=MemLimit,...,crash causes C1 to crash
* @library /test/lib
* @run driver compiler.print.CompileCommandMemLimit crash false
*/

/*
* @test id=c2_crash
* @requires vm.compiler2.enabled
* @summary Checks that -XX:CompileCommand=MemLimit,...,crash causes compilation to crash
* @summary Checks that -XX:CompileCommand=MemLimit,...,crash causes C2 to crash
* @library /test/lib
* @run driver compiler.print.CompileCommandMemLimit crash true
*/

/*
* @test id=c1_stop
* @requires vm.compiler1.enabled
* @summary Checks that -XX:CompileCommand=MemLimit,...,stop causes compilation to stop
* @summary Checks that -XX:CompileCommand=MemLimit,...,stop causes C1 to stop
* @library /test/lib
* @run driver compiler.print.CompileCommandMemLimit stop false
*/

/*
* @test id=c2_stop
* @requires vm.compiler2.enabled
* @summary Checks that -XX:CompileCommand=MemLimit,...,stop causes compilation to stop
* @summary Checks that -XX:CompileCommand=MemLimit,...,stop causes C2 to stop
* @library /test/lib
* @run driver compiler.print.CompileCommandMemLimit stop true
*/
Expand Down Expand Up @@ -87,10 +87,17 @@ private static void test(String include, String exclude) throws Exception {
List<String> options = new ArrayList<String>();
options.add("-Xcomp");
options.add("-XX:-Inline");
options.add("-Xmx100m");
options.add("-XX:CompileCommand=compileonly," + getTestClass() + "::*");
// We pass a very small size to guarantee the crash
options.add("-XX:CompileCommand=MemStat," + getTestMethod(include) + ",print");
options.add("-XX:CompileCommand=MemLimit," + getTestMethod(include) + ",4k" + (test_crash ? "~crash" : ""));
if (test_crash) {
options.add("-XX:CompileCommand=MemLimit," + getTestMethod(include) + ",4k~crash");
options.add("-XX:-CreateCoredumpOnCrash");
} else {
options.add("-XX:CompileCommand=MemLimit," + getTestMethod(include) + ",4k");
}

if (c2) {
options.add("-XX:-TieredCompilation");
} else {
Expand Down

1 comment on commit b3126b6

@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.