test/compiler/startup/SmallCodeCacheStartup.java

Thu, 10 Oct 2013 15:44:12 +0200

author
anoll
date
Thu, 10 Oct 2013 15:44:12 +0200
changeset 5919
469216acdb28
child 6209
71f0ee9bbf0e
permissions
-rw-r--r--

8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
Summary: Ensure ensure correct initialization of compiler runtime
Reviewed-by: kvn, twisti

anoll@5919 1 /*
anoll@5919 2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
anoll@5919 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
anoll@5919 4 *
anoll@5919 5 * This code is free software; you can redistribute it and/or modify it
anoll@5919 6 * under the terms of the GNU General Public License version 2 only, as
anoll@5919 7 * published by the Free Software Foundation.
anoll@5919 8 *
anoll@5919 9 * This code is distributed in the hope that it will be useful, but WITHOUT
anoll@5919 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
anoll@5919 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
anoll@5919 12 * version 2 for more details (a copy is included in the LICENSE file that
anoll@5919 13 * accompanied this code).
anoll@5919 14 *
anoll@5919 15 * You should have received a copy of the GNU General Public License version
anoll@5919 16 * 2 along with this work; if not, write to the Free Software Foundation,
anoll@5919 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
anoll@5919 18 *
anoll@5919 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
anoll@5919 20 * or visit www.oracle.com if you need additional information or have any
anoll@5919 21 * questions.
anoll@5919 22 */
anoll@5919 23
anoll@5919 24 /*
anoll@5919 25 * @test
anoll@5919 26 * @bug 8023014
anoll@5919 27 * @summary Test ensures that there is no crash when compiler initialization fails
anoll@5919 28 * @library /testlibrary
anoll@5919 29 *
anoll@5919 30 */
anoll@5919 31 import com.oracle.java.testlibrary.*;
anoll@5919 32
anoll@5919 33 public class SmallCodeCacheStartup {
anoll@5919 34 public static void main(String[] args) throws Exception {
anoll@5919 35 ProcessBuilder pb;
anoll@5919 36 OutputAnalyzer out;
anoll@5919 37
anoll@5919 38 pb = ProcessTools.createJavaProcessBuilder("-XX:ReservedCodeCacheSize=3m", "-XX:CICompilerCount=64", "-version");
anoll@5919 39 out = new OutputAnalyzer(pb.start());
anoll@5919 40 out.shouldContain("no space to run compiler");
anoll@5919 41 out.shouldHaveExitValue(0);
anoll@5919 42 }
anoll@5919 43 }

mercurial