1 /* 2 * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 package gc.arguments; 25 26 /* 27 * @test TestUseCompressedOopsErgoSerial 28 * @bug 8010722 29 * @summary Tests ergonomics for UseCompressedOops. 30 * @requires vm.gc.Serial 31 * @library /test/lib 32 * @library / 33 * @modules java.base/jdk.internal.misc 34 * java.management/sun.management 35 * @build sun.hotspot.WhiteBox 36 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 37 * @run driver gc.arguments.TestUseCompressedOopsErgo -XX:+UseSerialGC 38 */ 39 40 /* 41 * @test TestUseCompressedOopsErgoParallel 42 * @bug 8010722 43 * @summary Tests ergonomics for UseCompressedOops. 44 * @requires vm.gc.Parallel 45 * @library /test/lib 46 * @library / 47 * @modules java.base/jdk.internal.misc 48 * java.management/sun.management 49 * @build sun.hotspot.WhiteBox 50 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 51 * @run driver gc.arguments.TestUseCompressedOopsErgo -XX:+UseParallelGC 52 */ 53 54 /* 55 * @test TestUseCompressedOopsErgoG1 56 * @bug 8010722 57 * @summary Tests ergonomics for UseCompressedOops. 58 * @requires vm.gc.G1 59 * @library /test/lib 60 * @library / 61 * @modules java.base/jdk.internal.misc 62 * java.management/sun.management 63 * @build sun.hotspot.WhiteBox 64 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 65 * @run driver gc.arguments.TestUseCompressedOopsErgo -XX:+UseG1GC 66 */ 67 68 /* 69 * @test TestUseCompressedOopsErgoShenandoah 70 * @bug 8010722 71 * @comment Graal does not support Shenandoah 72 * @requires vm.gc.Shenandoah & !vm.graal.enabled 73 * @library /test/lib 74 * @library / 75 * @modules java.base/jdk.internal.misc 76 * java.management/sun.management 77 * @build sun.hotspot.WhiteBox 78 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 79 * @run driver gc.arguments.TestUseCompressedOopsErgo -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC 80 */ 81 82 public class TestUseCompressedOopsErgo { 83 84 public static void main(String args[]) throws Exception { 85 if (!TestUseCompressedOopsErgoTools.is64bitVM()) { 86 // this test is relevant for 64 bit VMs only 87 return; 88 } 89 final String[] gcFlags = args; 90 TestUseCompressedOopsErgoTools.checkCompressedOopsErgo(gcFlags); 91 } 92 } 93