hotspot/test/compiler/codecache/cli/codeheapsize/TestCodeHeapSizeOptions.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 codeheapsize;
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    24
30604
b8d532cb6420 8067013: Rename the com.oracle.java.testlibary package
ykantser
parents: 29678
diff changeset
    25
import jdk.test.lib.Platform;
28390
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    26
import common.CodeCacheCLITestBase;
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    27
import common.CodeCacheCLITestCase;
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    28
import sun.hotspot.code.BlobType;
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    29
import java.util.EnumSet;
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    30
/**
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    31
 * @test
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    32
 * @bug 8015774
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    33
 * @summary Verify processing of options related to code heaps sizing.
33730
30e064828045 8140189: [TESTBUG] Get rid of "@library /../../test/lib" in jtreg tests
cjplummer
parents: 30604
diff changeset
    34
 * @library /testlibrary .. /test/lib
29678
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28390
diff changeset
    35
 * @modules java.base/sun.misc
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28390
diff changeset
    36
 *          java.compiler
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28390
diff changeset
    37
 *          java.management
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28390
diff changeset
    38
 *          jdk.jvmstat/sun.jvmstat.monitor
30604
b8d532cb6420 8067013: Rename the com.oracle.java.testlibary package
ykantser
parents: 29678
diff changeset
    39
 * @build TestCodeHeapSizeOptions jdk.test.lib.* codeheapsize.*
28390
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    40
 *        common.*
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    41
 * @run main/timeout=240 codeheapsize.TestCodeHeapSizeOptions
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    42
 */
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    43
public class TestCodeHeapSizeOptions extends CodeCacheCLITestBase {
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    44
    private static final CodeCacheCLITestCase JVM_STARTUP
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    45
            = new CodeCacheCLITestCase(new CodeCacheCLITestCase.Description(
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    46
                            options -> options.segmented,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    47
                            EnumSet.noneOf(BlobType.class)),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    48
                    new JVMStartupRunner());
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    49
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    50
    private static final CodeCacheCLITestCase CODE_CACHE_FREE_SPACE
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    51
            = new CodeCacheCLITestCase(new CodeCacheCLITestCase.Description(
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    52
                            options -> options.segmented
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    53
                                    && Platform.isDebugBuild(),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    54
                            EnumSet.noneOf(BlobType.class)),
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    55
                    new CodeCacheFreeSpaceRunner());
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    56
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    57
    private static final GenericCodeHeapSizeRunner GENERIC_RUNNER
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    58
            = new GenericCodeHeapSizeRunner();
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 TestCodeHeapSizeOptions() {
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    61
        super(CodeCacheCLITestBase.OPTIONS_SET,
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.INT_MODE.description,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    64
                        GENERIC_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.NON_TIERED.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.TIERED_LEVEL_0.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_1.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_4.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
                JVM_STARTUP,
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    78
                CODE_CACHE_FREE_SPACE);
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    79
    }
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    80
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    81
    public static void main(String args[]) throws Throwable {
263a69157012 8059623: JEP-JDK-8043304: Test task: command line options tests
fzhinkin
parents:
diff changeset
    82
        new TestCodeHeapSizeOptions().runTestCases();
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
}