< prev index next >

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

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


  85  *      TestAllocIntArrays
  86  *
  87  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
  88  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
  89  *      TestAllocIntArrays
  90  *
  91  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
  92  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
  93  *      TestAllocIntArrays
  94  *
  95  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
  96  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
  97  *      TestAllocIntArrays
  98  *
  99  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
 100  *      -XX:+UseShenandoahGC
 101  *      -XX:-UseTLAB -XX:+ShenandoahVerify
 102  *      TestAllocIntArrays
 103  */
 104 








































 105 import java.util.Random;
 106 
 107 public class TestAllocIntArrays {
 108 
 109     static final long TARGET_MB = Long.getLong("target", 10_000); // 10 Gb allocation
 110 
 111     static volatile Object sink;
 112 
 113     public static void main(String[] args) throws Exception {
 114         final int min = 0;
 115         final int max = 384 * 1024;
 116         long count = TARGET_MB * 1024 * 1024 / (16 + 4 * (min + (max - min) / 2));
 117 
 118         Random r = new Random();
 119         for (long c = 0; c < count; c++) {
 120             sink = new int[min + r.nextInt(max - min)];
 121         }
 122     }
 123 
 124 }


  85  *      TestAllocIntArrays
  86  *
  87  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
  88  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
  89  *      TestAllocIntArrays
  90  *
  91  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
  92  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
  93  *      TestAllocIntArrays
  94  *
  95  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
  96  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
  97  *      TestAllocIntArrays
  98  *
  99  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
 100  *      -XX:+UseShenandoahGC
 101  *      -XX:-UseTLAB -XX:+ShenandoahVerify
 102  *      TestAllocIntArrays
 103  */
 104 
 105 /*
 106  * @test TestAllocIntArrays
 107  * @summary Acceptance tests: collector can withstand allocation
 108  * @key gc
 109  * @requires vm.gc.Shenandoah & !vm.graal.enabled
 110  *
 111  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
 112  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
 113  *      -XX:+ShenandoahOOMDuringEvacALot -XX:+ShenandoahVerify
 114  *      TestAllocIntArrays
 115  *
 116  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
 117  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
 118  *      -XX:+ShenandoahAllocFailureALot -XX:+ShenandoahVerify
 119  *      TestAllocIntArrays
 120  *
 121  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
 122  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
 123  *      -XX:+ShenandoahOOMDuringEvacALot
 124  *      TestAllocIntArrays
 125  *
 126  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
 127  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
 128  *      -XX:+ShenandoahAllocFailureALot
 129  *      TestAllocIntArrays
 130  *
 131  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
 132  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
 133  *      TestAllocIntArrays
 134  *
 135  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
 136  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
 137  *      -XX:+ShenandoahVerify
 138  *      TestAllocIntArrays
 139  *
 140  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
 141  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
 142  *      TestAllocIntArrays
 143  */
 144 
 145 import java.util.Random;
 146 
 147 public class TestAllocIntArrays {
 148 
 149     static final long TARGET_MB = Long.getLong("target", 10_000); // 10 Gb allocation
 150 
 151     static volatile Object sink;
 152 
 153     public static void main(String[] args) throws Exception {
 154         final int min = 0;
 155         final int max = 384 * 1024;
 156         long count = TARGET_MB * 1024 * 1024 / (16 + 4 * (min + (max - min) / 2));
 157 
 158         Random r = new Random();
 159         for (long c = 0; c < count; c++) {
 160             sink = new int[min + r.nextInt(max - min)];
 161         }
 162     }
 163 
 164 }
< prev index next >