< prev index next >

test/hotspot/jtreg/gc/stress/TestMultiThreadStressRSet.java

Print this page

 32 import jdk.test.lib.Utils;
 33 
 34 /*
 35  * @test TestMultiThreadStressRSet.java
 36  * @key stress randomness
 37  * @requires vm.gc.G1
 38  * @requires os.maxMemory > 2G
 39  * @requires vm.opt.MaxGCPauseMillis == "null"
 40  *
 41  * @summary Stress G1 Remembered Set using multiple threads
 42  * @modules java.base/jdk.internal.misc
 43  * @library /test/lib
 44  * @build sun.hotspot.WhiteBox
 45  * @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox
 46  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
 47  *   -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=1 -Xlog:gc
 48  *   -Xmx500m -XX:G1HeapRegionSize=1m -XX:MaxGCPauseMillis=1000 gc.stress.TestMultiThreadStressRSet 10 4
 49  *
 50  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
 51  *   -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=100 -Xlog:gc
 52  *   -Xmx1G -XX:G1HeapRegionSize=8m -XX:MaxGCPauseMillis=1000 gc.stress.TestMultiThreadStressRSet 60 16
 53  *
 54  * @run main/othervm/timeout=700 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
 55  *   -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=100 -Xlog:gc
 56  *   -Xmx500m -XX:G1HeapRegionSize=1m -XX:MaxGCPauseMillis=1000 gc.stress.TestMultiThreadStressRSet 600 32
 57  */
 58 public class TestMultiThreadStressRSet {
 59 
 60     private static final WhiteBox WB = WhiteBox.getWhiteBox();
 61     private static final int REF_SIZE = WB.getHeapOopSize();
 62     private static final int REGION_SIZE = WB.g1RegionSize();
 63 
 64     // How many regions to use for the storage
 65     private static final int STORAGE_REGIONS = 20;
 66 
 67     // Size a single obj in the storage
 68     private static final int OBJ_SIZE = 1024;
 69 
 70     // How many regions of young/old gen to use in the BUFFER
 71     private static final int BUFFER_YOUNG_REGIONS = 60;
 72     private static final int BUFFER_OLD_REGIONS = 40;

 32 import jdk.test.lib.Utils;
 33 
 34 /*
 35  * @test TestMultiThreadStressRSet.java
 36  * @key stress randomness
 37  * @requires vm.gc.G1
 38  * @requires os.maxMemory > 2G
 39  * @requires vm.opt.MaxGCPauseMillis == "null"
 40  *
 41  * @summary Stress G1 Remembered Set using multiple threads
 42  * @modules java.base/jdk.internal.misc
 43  * @library /test/lib
 44  * @build sun.hotspot.WhiteBox
 45  * @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox
 46  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
 47  *   -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=1 -Xlog:gc
 48  *   -Xmx500m -XX:G1HeapRegionSize=1m -XX:MaxGCPauseMillis=1000 gc.stress.TestMultiThreadStressRSet 10 4
 49  *
 50  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
 51  *   -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=100 -Xlog:gc
 52  *   -Xmx1100M -XX:G1HeapRegionSize=8m -XX:MaxGCPauseMillis=1000 gc.stress.TestMultiThreadStressRSet 60 16
 53  *
 54  * @run main/othervm/timeout=700 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
 55  *   -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=100 -Xlog:gc
 56  *   -Xmx500m -XX:G1HeapRegionSize=1m -XX:MaxGCPauseMillis=1000 gc.stress.TestMultiThreadStressRSet 600 32
 57  */
 58 public class TestMultiThreadStressRSet {
 59 
 60     private static final WhiteBox WB = WhiteBox.getWhiteBox();
 61     private static final int REF_SIZE = WB.getHeapOopSize();
 62     private static final int REGION_SIZE = WB.g1RegionSize();
 63 
 64     // How many regions to use for the storage
 65     private static final int STORAGE_REGIONS = 20;
 66 
 67     // Size a single obj in the storage
 68     private static final int OBJ_SIZE = 1024;
 69 
 70     // How many regions of young/old gen to use in the BUFFER
 71     private static final int BUFFER_YOUNG_REGIONS = 60;
 72     private static final int BUFFER_OLD_REGIONS = 40;
< prev index next >