Path: blob/master/test/hotspot/jtreg/compiler/codecache/cli/printcodecache/TestPrintCodeCacheOption.java
41154 views
/*1* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223/**24* @test25* @bug 801577426* @summary Verify that PrintCodeCache option print correct information.27* @library /test/lib /28* @modules java.base/jdk.internal.misc29* java.compiler30* java.management31* jdk.internal.jvmstat/sun.jvmstat.monitor32*33* @run driver/timeout=240 compiler.codecache.cli.printcodecache.TestPrintCodeCacheOption34*/3536package compiler.codecache.cli.printcodecache;3738import compiler.codecache.cli.common.CodeCacheCLITestBase;39import compiler.codecache.cli.common.CodeCacheCLITestCase;40import sun.hotspot.code.BlobType;4142import java.util.EnumSet;4344public class TestPrintCodeCacheOption extends CodeCacheCLITestBase {45private static final CodeCacheCLITestCase DISABLED_PRINT_CODE_CACHE46= new CodeCacheCLITestCase(new CodeCacheCLITestCase.Description(47options -> true, EnumSet.noneOf(BlobType.class)),48new PrintCodeCacheRunner(false));4950private static final CodeCacheCLITestCase.Runner DEFAULT_RUNNER51= new PrintCodeCacheRunner();5253private TestPrintCodeCacheOption() {54super(CodeCacheCLITestBase.OPTIONS_SET,55new CodeCacheCLITestCase(CodeCacheCLITestCase56.CommonDescriptions.INT_MODE.description,57DEFAULT_RUNNER),58new CodeCacheCLITestCase(CodeCacheCLITestCase59.CommonDescriptions.NON_SEGMENTED.description,60DEFAULT_RUNNER),61new CodeCacheCLITestCase(CodeCacheCLITestCase62.CommonDescriptions.NON_TIERED.description,63DEFAULT_RUNNER),64new CodeCacheCLITestCase(CodeCacheCLITestCase65.CommonDescriptions.TIERED_LEVEL_0.description,66DEFAULT_RUNNER),67new CodeCacheCLITestCase(CodeCacheCLITestCase68.CommonDescriptions.TIERED_LEVEL_1.description,69DEFAULT_RUNNER),70new CodeCacheCLITestCase(CodeCacheCLITestCase71.CommonDescriptions.TIERED_LEVEL_4.description,72DEFAULT_RUNNER),73DISABLED_PRINT_CODE_CACHE);74}7576public static void main(String args[]) throws Throwable {77new TestPrintCodeCacheOption().runTestCases();78}79}808182