Mon, 28 Jul 2014 15:06:38 -0700
8051344: JVM crashed in Compile::start() during method parsing w/ UseRTMDeopt turned on
Summary: call rtm_deopt() only if there were no compilation bailouts before.
Reviewed-by: kvn
ctornqvi@5256 | 1 | /* |
ccheung@6309 | 2 | * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. |
ctornqvi@5256 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ctornqvi@5256 | 4 | * |
ctornqvi@5256 | 5 | * This code is free software; you can redistribute it and/or modify it |
ctornqvi@5256 | 6 | * under the terms of the GNU General Public License version 2 only, as |
ctornqvi@5256 | 7 | * published by the Free Software Foundation. |
ctornqvi@5256 | 8 | * |
ctornqvi@5256 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
ctornqvi@5256 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ctornqvi@5256 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ctornqvi@5256 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
ctornqvi@5256 | 13 | * accompanied this code). |
ctornqvi@5256 | 14 | * |
ctornqvi@5256 | 15 | * You should have received a copy of the GNU General Public License version |
ctornqvi@5256 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
ctornqvi@5256 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ctornqvi@5256 | 18 | * |
ctornqvi@5256 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ctornqvi@5256 | 20 | * or visit www.oracle.com if you need additional information or have any |
ctornqvi@5256 | 21 | * questions. |
ctornqvi@5256 | 22 | */ |
ctornqvi@5256 | 23 | |
ctornqvi@5256 | 24 | /* |
ctornqvi@5256 | 25 | * @test |
ctornqvi@5256 | 26 | * @bug 7167142 |
ctornqvi@5256 | 27 | * @summary Warn if unused .hotspot_compiler file is present |
ctornqvi@5256 | 28 | * @library /testlibrary |
ctornqvi@5256 | 29 | */ |
ctornqvi@5256 | 30 | |
ctornqvi@5256 | 31 | import java.io.PrintWriter; |
ctornqvi@5256 | 32 | import com.oracle.java.testlibrary.*; |
ctornqvi@5256 | 33 | |
ctornqvi@5256 | 34 | public class CompilerConfigFileWarning { |
ctornqvi@5256 | 35 | public static void main(String[] args) throws Exception { |
ccheung@6309 | 36 | if (Platform.isDebugBuild()) { |
ctornqvi@5256 | 37 | System.out.println("Skip on debug builds since we'll always read the file there"); |
ctornqvi@5256 | 38 | return; |
ctornqvi@5256 | 39 | } |
ctornqvi@5256 | 40 | |
ctornqvi@5256 | 41 | PrintWriter pw = new PrintWriter(".hotspot_compiler"); |
ctornqvi@5256 | 42 | pw.println("aa"); |
ctornqvi@5256 | 43 | pw.close(); |
ctornqvi@5256 | 44 | |
ctornqvi@5256 | 45 | ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-version"); |
ctornqvi@5256 | 46 | OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
ctornqvi@5256 | 47 | output.shouldContain("warning: .hotspot_compiler file is present but has been ignored. Run with -XX:CompileCommandFile=.hotspot_compiler to load the file."); |
ctornqvi@5256 | 48 | } |
ctornqvi@5256 | 49 | } |