< prev index next >

test/hotspot/jtreg/gc/TestAllocHumongousFragment.java

Print this page

160  *      -XX:+ShenandoahVerify
161  *      TestAllocHumongousFragment
162  *
163  * @run main/othervm -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g -XX:ShenandoahTargetNumRegions=2048
164  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
165  *      TestAllocHumongousFragment
166  */
167 
168  /*
169  * @test id=g1
170  * @summary Make sure G1 can recover from humongous allocation fragmentation
171  * @key randomness
172  * @requires vm.gc.G1
173  * @library /test/lib
174  *
175  * @run main/othervm -Xlog:gc+region=trace -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
176  *      -XX:VerifyGCType=full -XX:+VerifyDuringGC -XX:+VerifyAfterGC
177  *      TestAllocHumongousFragment
178  */
179 












180 import java.util.*;
181 import jdk.test.lib.Utils;
182 
183 public class TestAllocHumongousFragment {
184 
185     static final long TARGET_MB = Long.getLong("target", 30_000); // 30 Gb allocations
186     static final long LIVE_MB   = Long.getLong("occupancy", 700); // 700 Mb alive
187 
188     static volatile Object sink;
189 
190     static List<int[]> objects;
191 
192     public static void main(String[] args) throws Exception {
193         final int min = 128 * 1024;
194         final int max = 16 * 1024 * 1024;
195         final long count = TARGET_MB * 1024 * 1024 / (16 + 4 * (min + (max - min) / 2));
196 
197         objects = new ArrayList<>();
198         long current = 0;
199 

160  *      -XX:+ShenandoahVerify
161  *      TestAllocHumongousFragment
162  *
163  * @run main/othervm -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g -XX:ShenandoahTargetNumRegions=2048
164  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
165  *      TestAllocHumongousFragment
166  */
167 
168  /*
169  * @test id=g1
170  * @summary Make sure G1 can recover from humongous allocation fragmentation
171  * @key randomness
172  * @requires vm.gc.G1
173  * @library /test/lib
174  *
175  * @run main/othervm -Xlog:gc+region=trace -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
176  *      -XX:VerifyGCType=full -XX:+VerifyDuringGC -XX:+VerifyAfterGC
177  *      TestAllocHumongousFragment
178  */
179 
180  /*
181  * @test id=g1-alt-forwarding
182  * @summary Make sure G1 can recover from humongous allocation fragmentation, with alt GC forwarding
183  * @key randomness
184  * @requires vm.gc.G1
185  * @library /test/lib
186  *
187  * @run main/othervm -Xlog:gc+region=trace -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
188  *      -XX:VerifyGCType=full -XX:+VerifyDuringGC -XX:+VerifyAfterGC -XX:+UseAltGCForwarding
189  *      TestAllocHumongousFragment
190  */
191 
192 import java.util.*;
193 import jdk.test.lib.Utils;
194 
195 public class TestAllocHumongousFragment {
196 
197     static final long TARGET_MB = Long.getLong("target", 30_000); // 30 Gb allocations
198     static final long LIVE_MB   = Long.getLong("occupancy", 700); // 700 Mb alive
199 
200     static volatile Object sink;
201 
202     static List<int[]> objects;
203 
204     public static void main(String[] args) throws Exception {
205         final int min = 128 * 1024;
206         final int max = 16 * 1024 * 1024;
207         final long count = TARGET_MB * 1024 * 1024 / (16 + 4 * (min + (max - min) / 2));
208 
209         objects = new ArrayList<>();
210         long current = 0;
211 
< prev index next >