hotspot/test/compiler/codecache/cli/printcodecache/TestPrintCodeCacheOption.java
author cjplummer
Thu, 29 Oct 2015 12:04:04 -0700
changeset 33730 30e064828045
parent 30604 b8d532cb6420
child 36851 03e2f4d0a421
permissions -rw-r--r--
8140189: [TESTBUG] Get rid of "@library /../../test/lib" in jtreg tests Summary: Use new external.lib.roots property in TEST.ROOT so /../../test/lib is not needed. Reviewed-by: mseledtsov, sla, iklam
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28390
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
     1
/*
29678
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28390
diff changeset
     2
 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
28390
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
     4
 *
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
     7
 * published by the Free Software Foundation.
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
     8
 *
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    13
 * accompanied this code).
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    14
 *
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    18
 *
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    21
 * questions.
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    22
 */
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    23
package printcodecache;
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    24
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    25
import common.CodeCacheCLITestBase;
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    26
import common.CodeCacheCLITestCase;
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    27
import sun.hotspot.code.BlobType;
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    28
import java.util.EnumSet;
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    29
/**
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    30
 * @test
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    31
 * @bug 8015774
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    32
 * @summary Verify that PrintCodeCache option print correct information.
33730
30e064828045 8140189: [TESTBUG] Get rid of "@library /../../test/lib" in jtreg tests
cjplummer
parents: 30604
diff changeset
    33
 * @library /testlibrary .. /test/lib
29678
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28390
diff changeset
    34
 * @modules java.base/sun.misc
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28390
diff changeset
    35
 *          java.compiler
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28390
diff changeset
    36
 *          java.management
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28390
diff changeset
    37
 *          jdk.jvmstat/sun.jvmstat.monitor
30604
b8d532cb6420 8067013: Rename the com.oracle.java.testlibary package
ykantser
parents: 29678
diff changeset
    38
 * @build TestPrintCodeCacheOption jdk.test.lib.*
28390
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    39
 *        printcodecache.* common.*
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    40
 * @run main/timeout=240 printcodecache.TestPrintCodeCacheOption
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    41
 */
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    42
public class TestPrintCodeCacheOption extends CodeCacheCLITestBase {
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    43
    private static final CodeCacheCLITestCase DISABLED_PRINT_CODE_CACHE
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    44
            = new CodeCacheCLITestCase(new CodeCacheCLITestCase.Description(
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    45
                            options -> true, EnumSet.noneOf(BlobType.class)),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    46
                    new PrintCodeCacheRunner(false));
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    47
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    48
    private static final CodeCacheCLITestCase.Runner DEFAULT_RUNNER
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    49
            = new PrintCodeCacheRunner();
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    50
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    51
    private TestPrintCodeCacheOption() {
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    52
        super(CodeCacheCLITestBase.OPTIONS_SET,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    53
                new CodeCacheCLITestCase(CodeCacheCLITestCase
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    54
                        .CommonDescriptions.INT_MODE.description,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    55
                        DEFAULT_RUNNER),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    56
                new CodeCacheCLITestCase(CodeCacheCLITestCase
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    57
                        .CommonDescriptions.NON_SEGMENTED.description,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    58
                        DEFAULT_RUNNER),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    59
                new CodeCacheCLITestCase(CodeCacheCLITestCase
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    60
                        .CommonDescriptions.NON_TIERED.description,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    61
                        DEFAULT_RUNNER),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    62
                new CodeCacheCLITestCase(CodeCacheCLITestCase
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    63
                        .CommonDescriptions.TIERED_LEVEL_0.description,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    64
                        DEFAULT_RUNNER),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    65
                new CodeCacheCLITestCase(CodeCacheCLITestCase
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    66
                        .CommonDescriptions.TIERED_LEVEL_1.description,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    67
                        DEFAULT_RUNNER),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    68
                new CodeCacheCLITestCase(CodeCacheCLITestCase
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    69
                        .CommonDescriptions.TIERED_LEVEL_4.description,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    70
                        DEFAULT_RUNNER),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    71
                DISABLED_PRINT_CODE_CACHE);
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    72
    }
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    73
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    74
    public static void main(String args[]) throws Throwable {
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    75
        new TestPrintCodeCacheOption().runTestCases();
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    76
    }
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    77
}