hotspot/test/compiler/codecache/cli/codeheapsize/TestCodeHeapSizeOptions.java
author gtriantafill
Thu, 19 Jan 2017 10:56:32 -0500
changeset 43467 f91da24c6bca
parent 40631 ed82623d7831
permissions -rw-r--r--
8152206: Simplify jvmstat modules Reviewed-by: alanb, mchung, hseigel
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
/*
43467
f91da24c6bca 8152206: Simplify jvmstat modules
gtriantafill
parents: 40631
diff changeset
     2
 * Copyright (c) 2014, 2017, 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
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
 * @test
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    26
 * @bug 8015774
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    27
 * @summary Verify processing of options related to code heaps sizing.
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 40059
diff changeset
    28
 * @library /test/lib /
36851
03e2f4d0a421 8153737: Unsupported Module
chegar
parents: 33730
diff changeset
    29
 * @modules java.base/jdk.internal.misc
29678
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28390
diff changeset
    30
 *          java.compiler
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28390
diff changeset
    31
 *          java.management
43467
f91da24c6bca 8152206: Simplify jvmstat modules
gtriantafill
parents: 40631
diff changeset
    32
 *          jdk.internal.jvmstat/sun.jvmstat.monitor
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36851
diff changeset
    33
 *
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36851
diff changeset
    34
 * @run driver/timeout=240 compiler.codecache.cli.codeheapsize.TestCodeHeapSizeOptions
28390
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    35
 */
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36851
diff changeset
    36
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36851
diff changeset
    37
package compiler.codecache.cli.codeheapsize;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36851
diff changeset
    38
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36851
diff changeset
    39
import compiler.codecache.cli.common.CodeCacheCLITestBase;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36851
diff changeset
    40
import compiler.codecache.cli.common.CodeCacheCLITestCase;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36851
diff changeset
    41
import jdk.test.lib.Platform;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36851
diff changeset
    42
import sun.hotspot.code.BlobType;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36851
diff changeset
    43
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36851
diff changeset
    44
import java.util.EnumSet;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36851
diff changeset
    45
28390
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    46
public class TestCodeHeapSizeOptions extends CodeCacheCLITestBase {
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    47
    private static final CodeCacheCLITestCase JVM_STARTUP
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    48
            = new CodeCacheCLITestCase(new CodeCacheCLITestCase.Description(
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    49
                            options -> options.segmented,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    50
                            EnumSet.noneOf(BlobType.class)),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    51
                    new JVMStartupRunner());
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    52
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    53
    private static final CodeCacheCLITestCase CODE_CACHE_FREE_SPACE
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    54
            = new CodeCacheCLITestCase(new CodeCacheCLITestCase.Description(
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    55
                            options -> options.segmented
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    56
                                    && Platform.isDebugBuild(),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    57
                            EnumSet.noneOf(BlobType.class)),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    58
                    new CodeCacheFreeSpaceRunner());
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    59
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    60
    private static final GenericCodeHeapSizeRunner GENERIC_RUNNER
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    61
            = new GenericCodeHeapSizeRunner();
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    62
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    63
    private TestCodeHeapSizeOptions() {
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    64
        super(CodeCacheCLITestBase.OPTIONS_SET,
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.INT_MODE.description,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    67
                        GENERIC_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.NON_TIERED.description,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    70
                        GENERIC_RUNNER),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    71
                new CodeCacheCLITestCase(CodeCacheCLITestCase
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    72
                        .CommonDescriptions.TIERED_LEVEL_0.description,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    73
                        GENERIC_RUNNER),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    74
                new CodeCacheCLITestCase(CodeCacheCLITestCase
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    75
                        .CommonDescriptions.TIERED_LEVEL_1.description,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    76
                        GENERIC_RUNNER),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    77
                new CodeCacheCLITestCase(CodeCacheCLITestCase
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    78
                        .CommonDescriptions.TIERED_LEVEL_4.description,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    79
                        GENERIC_RUNNER),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    80
                JVM_STARTUP,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    81
                CODE_CACHE_FREE_SPACE);
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    82
    }
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    83
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    84
    public static void main(String args[]) throws Throwable {
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    85
        new TestCodeHeapSizeOptions().runTestCases();
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    86
    }
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    87
}