test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsErgo.java
author jcbeyler
Mon, 13 Aug 2018 09:19:21 -0700
changeset 51396 38ec0cea438e
parent 50455 2b73cce96dce
child 52925 9c18c9d839d3
permissions -rw-r--r--
8061467: Add UseLargePages to TestNUMAPageSize Summary: Add flag to test for all architectures to be tested Reviewed-by: phh, pliden, tschatzl
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19986
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
     1
/*
50455
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
     2
 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
41705
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
     4
 *
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
     7
 * published by the Free Software Foundation.
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
     8
 *
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
    13
 * accompanied this code).
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
    14
 *
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
    18
 *
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
    21
 * questions.
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 40631
diff changeset
    22
 */
19986
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    23
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    24
/*
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    25
 * @test TestUseCompressedOopsErgo
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    26
 * @key gc
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    27
 * @bug 8010722
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    28
 * @summary Tests ergonomics for UseCompressedOops.
50455
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    29
 * @requires vm.gc=="null"
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
    30
 * @library /test/lib
36851
03e2f4d0a421 8153737: Unsupported Module
chegar
parents: 33730
diff changeset
    31
 * @modules java.base/jdk.internal.misc
29678
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28190
diff changeset
    32
 *          java.management/sun.management
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
    33
 * @build sun.hotspot.WhiteBox
48791
6e079ff6c83c 8186635: ClassFileInstaller should be run as a driver
iignatyev
parents: 47216
diff changeset
    34
 * @run driver ClassFileInstaller sun.hotspot.WhiteBox
25958
8dc85547d6d6 8011397: JTREG needs to copy additional WhiteBox class file to JTwork/scratch/sun/hotspot
mgerdin
parents: 24841
diff changeset
    35
 *                              sun.hotspot.WhiteBox$WhiteBoxPermission
19986
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    36
 * @run main/othervm TestUseCompressedOopsErgo -XX:+UseG1GC
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    37
 * @run main/othervm TestUseCompressedOopsErgo -XX:+UseParallelGC
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    38
 * @run main/othervm TestUseCompressedOopsErgo -XX:+UseParallelGC -XX:-UseParallelOldGC
50455
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    39
 * @run main/othervm TestUseCompressedOopsErgo -XX:+UseSerialGC
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    40
 */
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    41
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    42
/*
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    43
 * @test TestUseCompressedOopsErgoCMS
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    44
 * @key gc
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    45
 * @bug 8010722
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    46
 * @comment Graal does not support CMS
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    47
 * @requires vm.gc=="null" & !vm.graal.enabled
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    48
 * @library /test/lib
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    49
 * @modules java.base/jdk.internal.misc
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    50
 *          java.management/sun.management
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    51
 * @build sun.hotspot.WhiteBox
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    52
 * @run driver ClassFileInstaller sun.hotspot.WhiteBox
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 48791
diff changeset
    53
 *                              sun.hotspot.WhiteBox$WhiteBoxPermission
19986
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    54
 * @run main/othervm TestUseCompressedOopsErgo -XX:+UseConcMarkSweepGC
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    55
 */
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    56
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    57
public class TestUseCompressedOopsErgo {
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    58
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    59
  public static void main(String args[]) throws Exception {
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    60
    if (!TestUseCompressedOopsErgoTools.is64bitVM()) {
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    61
      // this test is relevant for 64 bit VMs only
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    62
      return;
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    63
    }
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    64
    final String[] gcFlags = args;
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    65
    TestUseCompressedOopsErgoTools.checkCompressedOopsErgo(gcFlags);
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    66
  }
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    67
}
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    68