hotspot/test/gc/parallel/AdaptiveGCBoundary.java
author hseigel
Wed, 01 Mar 2017 08:00:02 -0500
changeset 46194 5596e6f63072
parent 40631 ed82623d7831
permissions -rw-r--r--
8172307: Remove ununsed JVM API JVM_GetModuleByPackageName() Summary: Remove get_module_by_package_name() etc., and unneeded test. Reviewed-by: sspitsyn, gtriantafill
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18443
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
     1
/*
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
     2
 * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
18443
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
     4
 *
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
     7
 * published by the Free Software Foundation.
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
     8
 *
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    13
 * accompanied this code).
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    14
 *
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    18
 *
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    21
 * questions.
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    22
 */
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    23
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    24
/**
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    25
 * @test AdaptiveGCBoundary
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    26
 * @summary UseAdaptiveGCBoundary is broken
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    27
 * @bug 8014546
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    28
 * @key gc
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    29
 * @key regression
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
    30
 * @library /test/lib
36851
03e2f4d0a421 8153737: Unsupported Module
chegar
parents: 30764
diff changeset
    31
 * @modules java.base/jdk.internal.misc
29678
dd2f3932c21e 8075586: Add @modules as needed to the open hotspot tests
ykantser
parents: 18443
diff changeset
    32
 *          java.management
18443
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    33
 * @run main/othervm AdaptiveGCBoundary
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    34
 * @author jon.masamitsu@oracle.com
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    35
 */
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    36
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
    37
import jdk.test.lib.process.ProcessTools;
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
    38
import jdk.test.lib.process.OutputAnalyzer;
18443
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    39
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    40
public class AdaptiveGCBoundary {
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    41
  public static void main(String args[]) throws Exception {
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    42
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    43
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    44
      "-showversion",
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    45
      "-XX:+UseParallelGC",
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    46
      "-XX:+UseAdaptiveGCBoundary",
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    47
      "-XX:+PrintCommandLineFlags",
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    48
      SystemGCCaller.class.getName()
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    49
      );
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    50
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    51
    OutputAnalyzer output = new OutputAnalyzer(pb.start());
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    52
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    53
    output.shouldContain("+UseAdaptiveGCBoundary");
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    54
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    55
    output.shouldNotContain("error");
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    56
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    57
    output.shouldHaveExitValue(0);
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    58
  }
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    59
  static class SystemGCCaller {
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    60
    public static void main(String [] args) {
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    61
      System.gc();
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    62
    }
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    63
  }
ca4b3427b7c7 8014851: UseAdaptiveGCBoundary is broken
jmasa
parents:
diff changeset
    64
}