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 package codeheapsize; 24 25 import common.CodeCacheCLITestBase; 26 import common.CodeCacheCLITestCase; 27 import sun.hotspot.code.BlobType; 28 import java.util.EnumSet; 29 /** 30 * @test 31 * @summary Verify processing of options related to code heaps sizing. 32 * @library /testlibrary /testlibrary/whitebox .. 33 * @build TestCodeHeapSizeOptions com.oracle.java.testlibrary.* codeheapsize.* 34 * common.* 35 * @run main/timeout=240 codeheapsize.TestCodeHeapSizeOptions 36 */ 37 public class TestCodeHeapSizeOptions extends CodeCacheCLITestBase { 38 private static final CodeCacheCLITestCase JVM_STARTUP 39 = new CodeCacheCLITestCase(new CodeCacheCLITestCase.Description( 40 options -> options.segmented, 41 EnumSet.noneOf(BlobType.class)), 42 new JVMStartupRunner()); 43 44 private static final CodeCacheCLITestCase CODE_CACHE_FREE_SPACE 45 = new CodeCacheCLITestCase(new CodeCacheCLITestCase.Description( 46 options -> options.segmented, 47 EnumSet.noneOf(BlobType.class)), 48 new CodeCacheFreeSpaceRunner()); 49 50 private static final GenericCodeHeapSizeRunner GENERIC_RUNNER 51 = new GenericCodeHeapSizeRunner(); 52 53 private TestCodeHeapSizeOptions() { 54 super(CodeCacheCLITestBase.OPTIONS_SET, 55 new CodeCacheCLITestCase(CodeCacheCLITestCase 56 .CommonDescriptions.INT_MODE.description, 57 GENERIC_RUNNER), 58 new CodeCacheCLITestCase(CodeCacheCLITestCase 59 .CommonDescriptions.NON_TIERED.description, 60 GENERIC_RUNNER), 61 new CodeCacheCLITestCase(CodeCacheCLITestCase 62 .CommonDescriptions.TIERED_LEVEL_0.description, 63 GENERIC_RUNNER), 64 new CodeCacheCLITestCase(CodeCacheCLITestCase 65 .CommonDescriptions.TIERED_LEVEL_1.description, 66 GENERIC_RUNNER), | 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 package codeheapsize; 24 25 import com.oracle.java.testlibrary.Platform; 26 import common.CodeCacheCLITestBase; 27 import common.CodeCacheCLITestCase; 28 import sun.hotspot.code.BlobType; 29 import java.util.EnumSet; 30 /** 31 * @test 32 * @bug 8015774 33 * @summary Verify processing of options related to code heaps sizing. 34 * @library /testlibrary .. /../../test/lib 35 * @build TestCodeHeapSizeOptions com.oracle.java.testlibrary.* codeheapsize.* 36 * common.* 37 * @run main/timeout=240 codeheapsize.TestCodeHeapSizeOptions 38 */ 39 public class TestCodeHeapSizeOptions extends CodeCacheCLITestBase { 40 private static final CodeCacheCLITestCase JVM_STARTUP 41 = new CodeCacheCLITestCase(new CodeCacheCLITestCase.Description( 42 options -> options.segmented, 43 EnumSet.noneOf(BlobType.class)), 44 new JVMStartupRunner()); 45 46 private static final CodeCacheCLITestCase CODE_CACHE_FREE_SPACE 47 = new CodeCacheCLITestCase(new CodeCacheCLITestCase.Description( 48 options -> options.segmented 49 && Platform.isDebugBuild(), 50 EnumSet.noneOf(BlobType.class)), 51 new CodeCacheFreeSpaceRunner()); 52 53 private static final GenericCodeHeapSizeRunner GENERIC_RUNNER 54 = new GenericCodeHeapSizeRunner(); 55 56 private TestCodeHeapSizeOptions() { 57 super(CodeCacheCLITestBase.OPTIONS_SET, 58 new CodeCacheCLITestCase(CodeCacheCLITestCase 59 .CommonDescriptions.INT_MODE.description, 60 GENERIC_RUNNER), 61 new CodeCacheCLITestCase(CodeCacheCLITestCase 62 .CommonDescriptions.NON_TIERED.description, 63 GENERIC_RUNNER), 64 new CodeCacheCLITestCase(CodeCacheCLITestCase 65 .CommonDescriptions.TIERED_LEVEL_0.description, 66 GENERIC_RUNNER), 67 new CodeCacheCLITestCase(CodeCacheCLITestCase 68 .CommonDescriptions.TIERED_LEVEL_1.description, 69 GENERIC_RUNNER), |