Skip to content

Commit

Permalink
8315692: Parallelize gc/stress/TestStressRSetCoarsening.java test
Browse files Browse the repository at this point in the history
Reviewed-by: shade, mli, lmesnik, tschatzl
  • Loading branch information
roy-soumadipta authored and shipilev committed Oct 2, 2023
1 parent 878d27d commit a564d43
Showing 1 changed file with 62 additions and 8 deletions.
70 changes: 62 additions & 8 deletions test/hotspot/jtreg/gc/stress/TestStressRSetCoarsening.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@
import jdk.test.whitebox.WhiteBox;

/*
* @test TestStressRSetCoarsening.java
* @test
* @key stress
* @bug 8146984 8147087
* @requires vm.gc.G1
* @requires os.maxMemory > 3G
* @requires vm.opt.MaxGCPauseMillis == "null"
*
* @summary Stress G1 Remembered Set by creating a lot of cross region links
* @modules java.base/jdk.internal.misc
* @library /test/lib
Expand All @@ -42,27 +41,82 @@
* @run main/othervm/timeout=300
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000
* -Xmx500m -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 1 0 300
* -Xmx500m -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 1 0 300
*/

/*
* @test
* @requires vm.gc.G1
* @requires os.maxMemory > 3G
* @requires vm.opt.MaxGCPauseMillis == "null"
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=300
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000
* -Xmx500m -XX:G1HeapRegionSize=8m gc.stress.TestStressRSetCoarsening 1 10 300
* -Xmx500m -XX:G1HeapRegionSize=8m gc.stress.TestStressRSetCoarsening 1 10 300
*/

/*
* @test
* @requires vm.gc.G1
* @requires os.maxMemory > 3G
* @requires vm.opt.MaxGCPauseMillis == "null"
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=300
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000
* -Xmx500m -XX:G1HeapRegionSize=32m gc.stress.TestStressRSetCoarsening 42 10 300
*/

/*
* @test
* @requires vm.gc.G1
* @requires os.maxMemory > 3G
* @requires vm.opt.MaxGCPauseMillis == "null"
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=300
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000
* -Xmx500m -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 2 0 300
* -Xmx500m -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 2 0 300
*/

/*
* @test
* @requires vm.gc.G1
* @requires os.maxMemory > 3G
* @requires vm.opt.MaxGCPauseMillis == "null"
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=1800
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000
* -Xmx1G -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 500 0 1800
* -Xmx1G -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 500 0 1800
*/

/*
* @test
* @requires vm.gc.G1
* @requires os.maxMemory > 3G
* @requires vm.opt.MaxGCPauseMillis == "null"
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=1800
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000
* -Xmx1G -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 10 10 1800
* -Xmx1G -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 10 10 1800
*/

/**
Expand Down Expand Up @@ -95,7 +149,7 @@ public static void main(String... args) throws InterruptedException {
}
int objectsPerRegion = Integer.parseInt(args[0]); // 1 means humongous
int regsToRefresh = Integer.parseInt(args[1]); // 0 means no regions to refresh at the end of cycle
int timeout = Integer.parseInt(args[2]); // in seconds, test should stop working eariler
int timeout = Integer.parseInt(args[2]); // in seconds, test should stop working earlier
new TestStressRSetCoarsening(objectsPerRegion, regsToRefresh, timeout).go();
}

Expand Down

0 comments on commit a564d43

Please sign in to comment.