< prev index next >

test/hotspot/jtreg/gc/shenandoah/TestAllocObjects.java

Print this page
rev 58687 : Shenandoah: New incremental-update mode


 100  *
 101  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 102  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
 103  *      TestAllocObjects
 104  *
 105  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 106  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
 107  *      -XX:+ShenandoahSuspendibleWorkers
 108  *      TestAllocObjects
 109  *
 110  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 111  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
 112  *      TestAllocObjects
 113  *
 114  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 115  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
 116  *      -XX:+ShenandoahSuspendibleWorkers
 117  *      TestAllocObjects
 118  */
 119 













































 120 import java.util.Random;
 121 
 122 public class TestAllocObjects {
 123 
 124     static final long TARGET_MB = Long.getLong("target", 10_000); // 10 Gb allocation
 125 
 126     static volatile Object sink;
 127 
 128     public static void main(String[] args) throws Exception {
 129         long count = TARGET_MB * 1024 * 1024 / 16;
 130         for (long c = 0; c < count; c++) {
 131             sink = new Object();
 132         }
 133     }
 134 
 135 }


 100  *
 101  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 102  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
 103  *      TestAllocObjects
 104  *
 105  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 106  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
 107  *      -XX:+ShenandoahSuspendibleWorkers
 108  *      TestAllocObjects
 109  *
 110  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 111  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
 112  *      TestAllocObjects
 113  *
 114  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 115  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
 116  *      -XX:+ShenandoahSuspendibleWorkers
 117  *      TestAllocObjects
 118  */
 119 
 120 /*
 121  * @test TestAllocObjects
 122  * @summary Acceptance tests: collector can withstand allocation
 123  * @key gc
 124  * @requires vm.gc.Shenandoah & !vm.graal.enabled
 125  *
 126  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 127  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
 128  *      -XX:+ShenandoahOOMDuringEvacALot -XX:+ShenandoahVerify
 129  *      TestAllocObjects
 130  *
 131  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 132  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
 133  *      -XX:+ShenandoahAllocFailureALot -XX:+ShenandoahVerify
 134  *      TestAllocObjects
 135  *
 136  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 137  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
 138  *      -XX:+ShenandoahOOMDuringEvacALot
 139  *      TestAllocObjects
 140  *
 141  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 142  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
 143  *      -XX:+ShenandoahAllocFailureALot
 144  *      TestAllocObjects
 145  *
 146  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 147  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
 148  *      TestAllocObjects
 149  *
 150  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 151  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
 152  *      -XX:+ShenandoahVerify
 153  *      TestAllocObjects
 154  *
 155  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 156  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
 157  *      TestAllocObjects
 158  *
 159  * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 160  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
 161  *      -XX:+ShenandoahSuspendibleWorkers
 162  *      TestAllocObjects
 163  */
 164 
 165 import java.util.Random;
 166 
 167 public class TestAllocObjects {
 168 
 169     static final long TARGET_MB = Long.getLong("target", 10_000); // 10 Gb allocation
 170 
 171     static volatile Object sink;
 172 
 173     public static void main(String[] args) throws Exception {
 174         long count = TARGET_MB * 1024 * 1024 / 16;
 175         for (long c = 0; c < count; c++) {
 176             sink = new Object();
 177         }
 178     }
 179 
 180 }
< prev index next >