test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsErgo.java
author rkennke
Mon, 10 Dec 2018 15:47:44 +0100
changeset 52925 9c18c9d839d3
parent 50455 2b73cce96dce
child 53523 4c5184c56dc2
permissions -rw-r--r--
8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental) Reviewed-by: kvn, roland, shade, coleenp, lmesnik, pliden, jgeorge, ihse, erikj Contributed-by: Christine Flood <chf@redhat.com>, Aleksey Shipilev <shade@redhat.com>, Roland Westrelin <rwestrel@redhat.com>, Zhenygu Gu <zgu@redhat.com>, Andrew Haley <aph@redhat.com>, Andrew Dinn <adinn@redhat.com>, Mario Torre <mtorre@redhat.com>, Roman Kennke <rkennke@redhat.com>
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
52925
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    57
/*
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    58
 * @test TestUseCompressedOopsErgoShenandoah
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    59
 * @key gc
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    60
 * @bug 8010722
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    61
 * @comment Graal does not support Shenandoah
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    62
 * @requires vm.gc.Shenandoah & !vm.graal.enabled
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    63
 * @library /test/lib
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    64
 * @modules java.base/jdk.internal.misc
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    65
 *          java.management/sun.management
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    66
 * @build sun.hotspot.WhiteBox
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    67
 * @run driver ClassFileInstaller sun.hotspot.WhiteBox
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    68
 *                              sun.hotspot.WhiteBox$WhiteBoxPermission
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    69
 * @run main/othervm TestUseCompressedOopsErgo -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    70
 */
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    71
19986
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    72
public class TestUseCompressedOopsErgo {
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    73
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    74
  public static void main(String args[]) throws Exception {
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    75
    if (!TestUseCompressedOopsErgoTools.is64bitVM()) {
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    76
      // 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
    77
      return;
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    78
    }
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    79
    final String[] gcFlags = args;
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    80
    TestUseCompressedOopsErgoTools.checkCompressedOopsErgo(gcFlags);
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    81
  }
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    82
}
33d188c66ed9 8010722: assert: failed: heap size is too big for compressed oops
tschatzl
parents:
diff changeset
    83