38 * @library /test/lib 39 * @compile PersonVcc.java 40 * @compile -XDenableValueTypes Person.java 41 * @compile -XDenableValueTypes ValueOops.java 42 * @run main ClassFileInstaller sun.hotspot.WhiteBox 43 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 44 * sun.hotspot.WhiteBox$WhiteBoxPermission 45 * @run main/othervm -Xint -noverify -XX:+UseSerialGC -Xmx128m -XX:+EnableMVT 46 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 47 * runtime.valhalla.valuetypes.ValueOops 48 * @run main/othervm -Xint -noverify -XX:+UseG1GC -Xmx128m -XX:+EnableMVT 49 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 50 * runtime.valhalla.valuetypes.ValueOops 51 * @run main/othervm -Xint -noverify -XX:+UseParallelGC -Xmx128m -XX:+EnableMVT 52 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 53 * runtime.valhalla.valuetypes.ValueOops 54 * @run main/othervm -Xint -noverify -XX:+UseConcMarkSweepGC -Xmx128m -XX:+EnableMVT 55 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 56 * runtime.valhalla.valuetypes.ValueOops 57 * @run main/othervm -Xcomp -noverify -XX:+UseSerialGC -Xmx128m -XX:+EnableMVT 58 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 59 * runtime.valhalla.valuetypes.ValueOops 60 * @run main/othervm -Xcomp -noverify -XX:+UseG1GC -Xmx128m -XX:+EnableMVT 61 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 62 * runtime.valhalla.valuetypes.ValueOops 63 * @run main/othervm -Xcomp -noverify -XX:+UseParallelGC -Xmx128m -XX:+EnableMVT 64 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 65 * runtime.valhalla.valuetypes.ValueOops 66 * @run main/othervm -Xcomp -noverify -XX:+UseConcMarkSweepGC -Xmx128m -XX:+EnableMVT 67 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 68 * runtime.valhalla.valuetypes.ValueOops 69 */ 70 public class ValueOops { 71 72 // Extra debug: -XX:+VerifyOops -XX:+VerifyStack -XX:+VerifyLastFrame -XX:+VerifyBeforeGC -XX:+VerifyAfterGC -XX:+VerifyDuringGC -XX:VerifySubSet=threads,heap 73 // Even more debugging: -XX:+TraceNewOopMapGeneration -Xlog:gc*=info 74 75 static final int NOF_PEOPLE = 1000; // Exercise arrays of this size 76 77 static int MIN_ACTIVE_GC_COUNT = 10; // Run active workload for this number of GC passes 78 79 static int MED_ACTIVE_GC_COUNT = 4; // Medium life span in terms of GC passes 80 81 static final String TEST_STRING1 = "Test String 1"; 82 static final String TEST_STRING2 = "Test String 2"; 83 84 static boolean USE_COMPILER = WhiteBox.getWhiteBox().getBooleanVMFlag("UseCompiler"); 85 86 public static void main(String[] args) { | 38 * @library /test/lib 39 * @compile PersonVcc.java 40 * @compile -XDenableValueTypes Person.java 41 * @compile -XDenableValueTypes ValueOops.java 42 * @run main ClassFileInstaller sun.hotspot.WhiteBox 43 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 44 * sun.hotspot.WhiteBox$WhiteBoxPermission 45 * @run main/othervm -Xint -noverify -XX:+UseSerialGC -Xmx128m -XX:+EnableMVT 46 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 47 * runtime.valhalla.valuetypes.ValueOops 48 * @run main/othervm -Xint -noverify -XX:+UseG1GC -Xmx128m -XX:+EnableMVT 49 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 50 * runtime.valhalla.valuetypes.ValueOops 51 * @run main/othervm -Xint -noverify -XX:+UseParallelGC -Xmx128m -XX:+EnableMVT 52 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 53 * runtime.valhalla.valuetypes.ValueOops 54 * @run main/othervm -Xint -noverify -XX:+UseConcMarkSweepGC -Xmx128m -XX:+EnableMVT 55 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 56 * runtime.valhalla.valuetypes.ValueOops 57 * @run main/othervm -Xcomp -noverify -XX:+UseSerialGC -Xmx128m -XX:+EnableMVT 58 * -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_isAssignableFrom 59 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 60 * runtime.valhalla.valuetypes.ValueOops 61 * @run main/othervm -Xcomp -noverify -XX:+UseG1GC -Xmx128m -XX:+EnableMVT 62 * -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_isAssignableFrom 63 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 64 * runtime.valhalla.valuetypes.ValueOops 65 * @run main/othervm -Xcomp -noverify -XX:+UseParallelGC -Xmx128m -XX:+EnableMVT 66 * -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_isAssignableFrom 67 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 68 * runtime.valhalla.valuetypes.ValueOops 69 * @run main/othervm -Xcomp -noverify -XX:+UseConcMarkSweepGC -Xmx128m -XX:+EnableMVT 70 * -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_isAssignableFrom 71 * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 72 * runtime.valhalla.valuetypes.ValueOops 73 */ 74 public class ValueOops { 75 76 // Extra debug: -XX:+VerifyOops -XX:+VerifyStack -XX:+VerifyLastFrame -XX:+VerifyBeforeGC -XX:+VerifyAfterGC -XX:+VerifyDuringGC -XX:VerifySubSet=threads,heap 77 // Even more debugging: -XX:+TraceNewOopMapGeneration -Xlog:gc*=info 78 79 static final int NOF_PEOPLE = 1000; // Exercise arrays of this size 80 81 static int MIN_ACTIVE_GC_COUNT = 10; // Run active workload for this number of GC passes 82 83 static int MED_ACTIVE_GC_COUNT = 4; // Medium life span in terms of GC passes 84 85 static final String TEST_STRING1 = "Test String 1"; 86 static final String TEST_STRING2 = "Test String 2"; 87 88 static boolean USE_COMPILER = WhiteBox.getWhiteBox().getBooleanVMFlag("UseCompiler"); 89 90 public static void main(String[] args) { |