1 /* |
1 /* |
2 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
18 * |
18 * |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
|
23 |
|
24 package gc.stress; |
23 |
25 |
24 import java.io.PrintStream; |
26 import java.io.PrintStream; |
25 import java.util.ArrayList; |
27 import java.util.ArrayList; |
26 import java.util.List; |
28 import java.util.List; |
27 import java.util.Map; |
29 import java.util.Map; |
41 * @build sun.hotspot.WhiteBox |
43 * @build sun.hotspot.WhiteBox |
42 * @run driver ClassFileInstaller sun.hotspot.WhiteBox |
44 * @run driver ClassFileInstaller sun.hotspot.WhiteBox |
43 * sun.hotspot.WhiteBox$WhiteBoxPermission |
45 * sun.hotspot.WhiteBox$WhiteBoxPermission |
44 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI |
46 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI |
45 * -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=1 -Xlog:gc |
47 * -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=1 -Xlog:gc |
46 * -Xmx500m -XX:G1HeapRegionSize=1m -XX:MaxGCPauseMillis=1000 TestMultiThreadStressRSet 10 4 |
48 * -Xmx500m -XX:G1HeapRegionSize=1m -XX:MaxGCPauseMillis=1000 gc.stress.TestMultiThreadStressRSet 10 4 |
47 * |
49 * |
48 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI |
50 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI |
49 * -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=100 -Xlog:gc |
51 * -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=100 -Xlog:gc |
50 * -Xmx1G -XX:G1HeapRegionSize=8m -XX:MaxGCPauseMillis=1000 TestMultiThreadStressRSet 60 16 |
52 * -Xmx1G -XX:G1HeapRegionSize=8m -XX:MaxGCPauseMillis=1000 gc.stress.TestMultiThreadStressRSet 60 16 |
51 * |
53 * |
52 * @run main/othervm/timeout=700 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI |
54 * @run main/othervm/timeout=700 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI |
53 * -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=100 -Xlog:gc |
55 * -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=100 -Xlog:gc |
54 * -Xmx500m -XX:G1HeapRegionSize=1m -XX:MaxGCPauseMillis=1000 TestMultiThreadStressRSet 600 32 |
56 * -Xmx500m -XX:G1HeapRegionSize=1m -XX:MaxGCPauseMillis=1000 gc.stress.TestMultiThreadStressRSet 600 32 |
55 */ |
57 */ |
56 public class TestMultiThreadStressRSet { |
58 public class TestMultiThreadStressRSet { |
57 |
59 |
58 private static final Random RND = new Random(2015 * 2016); |
60 private static final Random RND = new Random(2015 * 2016); |
59 private static final WhiteBox WB = WhiteBox.getWhiteBox(); |
61 private static final WhiteBox WB = WhiteBox.getWhiteBox(); |