8315692: Parallelize gc/stress/TestStressRSetCoarsening.java test

Reviewed-by: shade, mli, lmesnik, tschatzl
This commit is contained in:
Soumadipta Roy 2023-10-02 15:17:02 +00:00 committed by Aleksey Shipilev
parent 878d27dba1
commit a564d436c7

@ -27,13 +27,12 @@ import java.util.concurrent.TimeoutException;
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
@ -42,27 +41,82 @@ import 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 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
*/
/**
@ -95,7 +149,7 @@ public class TestStressRSetCoarsening {
}
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();
}