61 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
62 * -Dtarget=1000
63 * TestLotsOfCycles
64 *
65 * @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
66 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
67 * -Dtarget=10000
68 * TestLotsOfCycles
69 *
70 * @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
71 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
72 * -Dtarget=10000
73 * TestLotsOfCycles
74 *
75 * @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
76 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
77 * -Dtarget=1000
78 * TestLotsOfCycles
79 */
80
81 public class TestLotsOfCycles {
82
83 static final long TARGET_MB = Long.getLong("target", 10_000); // 10 Gb allocation, around 1K cycles to handle
84 static final long STRIDE = 100_000;
85
86 static volatile Object sink;
87
88 public static void main(String[] args) throws Exception {
89 long count = TARGET_MB * 1024 * 1024 / 16;
90 for (long c = 0; c < count; c += STRIDE) {
91 for (long s = 0; s < STRIDE; s++) {
92 sink = new Object();
93 }
94 Thread.sleep(1);
95 }
96 }
97
98 }
|
61 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
62 * -Dtarget=1000
63 * TestLotsOfCycles
64 *
65 * @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
66 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
67 * -Dtarget=10000
68 * TestLotsOfCycles
69 *
70 * @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
71 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
72 * -Dtarget=10000
73 * TestLotsOfCycles
74 *
75 * @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
76 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
77 * -Dtarget=1000
78 * TestLotsOfCycles
79 */
80
81 /*
82 * @test TestLotsOfCycles
83 * @key gc
84 * @requires vm.gc.Shenandoah & !vm.graal.enabled
85 *
86 * @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
87 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
88 * -XX:+ShenandoahOOMDuringEvacALot
89 * -Dtarget=1000
90 * TestLotsOfCycles
91 *
92 * @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
93 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
94 * -XX:+ShenandoahAllocFailureALot
95 * -Dtarget=1000
96 * TestLotsOfCycles
97 *
98 * @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
99 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
100 * -Dtarget=1000
101 * TestLotsOfCycles
102 *
103 * @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
104 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
105 * -Dtarget=10000
106 * TestLotsOfCycles
107 */
108
109 public class TestLotsOfCycles {
110
111 static final long TARGET_MB = Long.getLong("target", 10_000); // 10 Gb allocation, around 1K cycles to handle
112 static final long STRIDE = 100_000;
113
114 static volatile Object sink;
115
116 public static void main(String[] args) throws Exception {
117 long count = TARGET_MB * 1024 * 1024 / 16;
118 for (long c = 0; c < count; c += STRIDE) {
119 for (long s = 0; s < STRIDE; s++) {
120 sink = new Object();
121 }
122 Thread.sleep(1);
123 }
124 }
125
126 }
|