hotspot/test/gc/g1/TestHumongousCodeCacheRoots.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:
21563
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
     1
/*
29678
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28629
diff changeset
     2
 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
21563
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
     4
 *
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
     7
 * published by the Free Software Foundation.
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
     8
 *
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    13
 * accompanied this code).
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    14
 *
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    18
 *
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    21
 * questions.
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    22
 */
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    23
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    24
/*
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    25
 * @test
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    26
 * @key regression
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    27
 * @key gc
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    28
 * @bug 8027756
33730
30e064828045 8140189: [TESTBUG] Get rid of "@library /../../test/lib" in jtreg tests
cjplummer
parents: 30604
diff changeset
    29
 * @library /testlibrary /test/lib
29678
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28629
diff changeset
    30
 * @modules java.base/sun.misc
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 28629
diff changeset
    31
 *          java.management
21563
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    32
 * @build TestHumongousCodeCacheRoots
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    33
 * @run main ClassFileInstaller sun.hotspot.WhiteBox
25958
8dc85547d6d6 8011397: JTREG needs to copy additional WhiteBox class file to JTwork/scratch/sun/hotspot
mgerdin
parents: 21563
diff changeset
    34
 *                              sun.hotspot.WhiteBox$WhiteBoxPermission
21563
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    35
 * @summary Humongous objects may have references from the code cache
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    36
 * @run main TestHumongousCodeCacheRoots
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    37
*/
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    38
30604
b8d532cb6420 8067013: Rename the com.oracle.java.testlibary package
ykantser
parents: 29678
diff changeset
    39
import jdk.test.lib.*;
21563
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    40
import sun.hotspot.WhiteBox;
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    41
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    42
import java.util.ArrayList;
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    43
import java.util.Arrays;
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    44
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    45
class TestHumongousCodeCacheRootsHelper {
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    46
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    47
    static final int n = 1000000;
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    48
    static final int[] AA = new int[n];
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    49
    static final int[] BB = new int[n];
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    50
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    51
    public static void main(String args[]) throws Exception {
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    52
        // do some work so that the compiler compiles this method, inlining the
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    53
        // reference to the integer array (which is a humonguous object) into
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    54
        // the code cache.
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    55
        for(int i = 0; i < n; i++) {
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    56
            AA[i] = 0;
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    57
            BB[i] = 0;
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    58
        }
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    59
        // trigger a GC that checks that the verification code allows humongous
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    60
        // objects with code cache roots; objects should be all live here.
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    61
        System.gc();
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    62
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    63
        // deoptimize everyhing: this should make all compiled code zombies.
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    64
        WhiteBox wb = WhiteBox.getWhiteBox();
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    65
        wb.deoptimizeAll();
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    66
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    67
        // trigger a GC that checks that the verification code allows humongous
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    68
        // objects with code cache roots; objects should be all live here.
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    69
        System.gc();
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    70
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    71
        // wait a little for the code cache sweeper to try to clean up zombie nmethods
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    72
        // and unregister the code roots.
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    73
        try { Thread.sleep(5000); } catch (InterruptedException ex) { }
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    74
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    75
        // do some work on the arrays to make sure that they need to be live after the GCs
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    76
        for(int i = 0; i < n; i++) {
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    77
            AA[i] = 1;
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    78
            BB[i] = 10;
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    79
        }
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    80
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    81
        System.out.println();
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    82
    }
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    83
}
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    84
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    85
public class TestHumongousCodeCacheRoots {
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    86
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    87
  /**
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    88
   * Executes a class in a new VM process with the given parameters.
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    89
   * @param vmargs Arguments to the VM to run
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    90
   * @param classname Name of the class to run
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    91
   * @param arguments Arguments to the class
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    92
   * @param useTestDotJavaDotOpts Use test.java.opts as part of the VM argument string
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    93
   * @return The OutputAnalyzer with the results for the invocation.
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    94
   */
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    95
  public static OutputAnalyzer runWhiteBoxTest(String[] vmargs, String classname, String[] arguments, boolean useTestDotJavaDotOpts) throws Exception {
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    96
    ArrayList<String> finalargs = new ArrayList<String>();
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    97
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    98
    String[] whiteboxOpts = new String[] {
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
    99
      "-Xbootclasspath/a:.",
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   100
      "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI",
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   101
      "-cp", System.getProperty("java.class.path"),
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   102
    };
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   103
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   104
    if (useTestDotJavaDotOpts) {
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   105
      // System.getProperty("test.java.opts") is '' if no options is set,
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   106
      // we need to skip such a result
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   107
      String[] externalVMOpts = new String[0];
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   108
      if (System.getProperty("test.java.opts") != null && System.getProperty("test.java.opts").length() != 0) {
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   109
        externalVMOpts = System.getProperty("test.java.opts").split(" ");
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   110
      }
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   111
      finalargs.addAll(Arrays.asList(externalVMOpts));
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   112
    }
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   113
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   114
    finalargs.addAll(Arrays.asList(vmargs));
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   115
    finalargs.addAll(Arrays.asList(whiteboxOpts));
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   116
    finalargs.add(classname);
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   117
    finalargs.addAll(Arrays.asList(arguments));
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   118
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   119
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(finalargs.toArray(new String[0]));
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   120
    OutputAnalyzer output = new OutputAnalyzer(pb.start());
28629
43fbd61a0262 8068026: [TESTBUG] Check for -client in gc/g1/TestHumongousCodeCacheRoots.java
jwilhelm
parents: 28190
diff changeset
   121
    try {
43fbd61a0262 8068026: [TESTBUG] Check for -client in gc/g1/TestHumongousCodeCacheRoots.java
jwilhelm
parents: 28190
diff changeset
   122
        output.shouldHaveExitValue(0);
43fbd61a0262 8068026: [TESTBUG] Check for -client in gc/g1/TestHumongousCodeCacheRoots.java
jwilhelm
parents: 28190
diff changeset
   123
    } catch (RuntimeException e) {
43fbd61a0262 8068026: [TESTBUG] Check for -client in gc/g1/TestHumongousCodeCacheRoots.java
jwilhelm
parents: 28190
diff changeset
   124
        // It's ok if there is no client vm in the jdk.
43fbd61a0262 8068026: [TESTBUG] Check for -client in gc/g1/TestHumongousCodeCacheRoots.java
jwilhelm
parents: 28190
diff changeset
   125
        if (output.firstMatch("Unrecognized option: -client") == null) {
43fbd61a0262 8068026: [TESTBUG] Check for -client in gc/g1/TestHumongousCodeCacheRoots.java
jwilhelm
parents: 28190
diff changeset
   126
            throw e;
43fbd61a0262 8068026: [TESTBUG] Check for -client in gc/g1/TestHumongousCodeCacheRoots.java
jwilhelm
parents: 28190
diff changeset
   127
        }
43fbd61a0262 8068026: [TESTBUG] Check for -client in gc/g1/TestHumongousCodeCacheRoots.java
jwilhelm
parents: 28190
diff changeset
   128
    }
21563
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   129
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   130
    return output;
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   131
  }
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   132
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   133
  public static void runTest(String compiler, String[] other) throws Exception {
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   134
    ArrayList<String> joined = new ArrayList<String>();
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   135
    joined.add(compiler);
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   136
    joined.addAll(Arrays.asList(other));
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   137
    runWhiteBoxTest(joined.toArray(new String[0]), TestHumongousCodeCacheRootsHelper.class.getName(),
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   138
      new String[] {}, false);
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   139
  }
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   140
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   141
  public static void main(String[] args) throws Exception {
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   142
    final String[] baseArguments = new String[] {
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   143
      "-XX:+UseG1GC", "-XX:G1HeapRegionSize=1M", "-Xmx100M", // make sure we get a humongous region
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   144
      "-XX:+UnlockDiagnosticVMOptions",
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   145
      "-XX:InitiatingHeapOccupancyPercent=1", // strong code root marking
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   146
      "-XX:+G1VerifyHeapRegionCodeRoots", "-XX:+VerifyAfterGC", // make sure that verification is run
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   147
    };
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   148
    runTest("-client", baseArguments);
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   149
    runTest("-server", baseArguments);
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   150
  }
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   151
}
ccbd86010788 8027756: assert(!hr->isHumongous()) failed: code root in humongous region?
tschatzl
parents:
diff changeset
   152