1 /* 2 * Copyright (c) 2013, 2019, 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 * @key gc 29 * @bug 8010722 30 * @summary Tests ergonomics for UseCompressedOops. 31 * @requires vm.gc.Serial 32 * @library /test/lib 33 * @library / 34 * @modules java.base/jdk.internal.misc 35 * java.management/sun.management 36 * @build sun.hotspot.WhiteBox 37 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 38 * sun.hotspot.WhiteBox$WhiteBoxPermission 39 * @run main/othervm gc.arguments.TestUseCompressedOopsErgo -XX:+UseSerialGC 40 */ 41 42 /* 43 * @test TestUseCompressedOopsErgoParallel 44 * @key gc 45 * @bug 8010722 46 * @summary Tests ergonomics for UseCompressedOops. 47 * @requires vm.gc.Parallel 48 * @library /test/lib 49 * @library / 50 * @modules java.base/jdk.internal.misc 51 * java.management/sun.management 52 * @build sun.hotspot.WhiteBox 53 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 54 * sun.hotspot.WhiteBox$WhiteBoxPermission 55 * @run main/othervm gc.arguments.TestUseCompressedOopsErgo -XX:+UseParallelGC 56 * @run main/othervm gc.arguments.TestUseCompressedOopsErgo -XX:+UseParallelGC -XX:-UseParallelOldGC 57 */ 58 59 /* 60 * @test TestUseCompressedOopsErgoG1 61 * @key gc 62 * @bug 8010722 63 * @summary Tests ergonomics for UseCompressedOops. 64 * @requires vm.gc.G1 65 * @library /test/lib 66 * @library / 67 * @modules java.base/jdk.internal.misc 68 * java.management/sun.management 69 * @build sun.hotspot.WhiteBox 70 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 71 * sun.hotspot.WhiteBox$WhiteBoxPermission 72 * @run main/othervm gc.arguments.TestUseCompressedOopsErgo -XX:+UseG1GC 73 */ 74 75 /* 76 * @test TestUseCompressedOopsErgoShenandoah 77 * @key gc 78 * @bug 8010722 79 * @comment Graal does not support Shenandoah 80 * @requires vm.gc.Shenandoah & !vm.graal.enabled 81 * @library /test/lib 82 * @library / 83 * @modules java.base/jdk.internal.misc 84 * java.management/sun.management 85 * @build sun.hotspot.WhiteBox 86 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 87 * sun.hotspot.WhiteBox$WhiteBoxPermission 88 * @run main/othervm gc.arguments.TestUseCompressedOopsErgo -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC 89 */ 90 91 public class TestUseCompressedOopsErgo { 92 main(String args[])93 public static void main(String args[]) throws Exception { 94 if (!TestUseCompressedOopsErgoTools.is64bitVM()) { 95 // this test is relevant for 64 bit VMs only 96 return; 97 } 98 final String[] gcFlags = args; 99 TestUseCompressedOopsErgoTools.checkCompressedOopsErgo(gcFlags); 100 } 101 } 102 103