# HG changeset patch # User kvn # Date 1351211523 25200 # Node ID 006174cfe9794aa8ec6dbdbf96fb57466c45f84a # Parent a3ecd773a7b9315f3f98ecd08a8aea347517f382 7163534: VM could crashes assert(false) failed: infinite EA connection graph build Summary: In case of time or iterations limit reached C2 stops EA and continue compilation without EA as it does in product VM already. Reviewed-by: twisti diff -r a3ecd773a7b9 -r 006174cfe979 src/share/vm/opto/c2_globals.hpp --- a/src/share/vm/opto/c2_globals.hpp Wed Oct 24 14:33:22 2012 -0700 +++ b/src/share/vm/opto/c2_globals.hpp Thu Oct 25 17:32:03 2012 -0700 @@ -439,6 +439,9 @@ product(bool, DoEscapeAnalysis, true, \ "Perform escape analysis") \ \ + develop(bool, ExitEscapeAnalysisOnTimeout, true, \ + "Exit or throw assert in EA when it reaches time limit") \ + \ notproduct(bool, PrintEscapeAnalysis, false, \ "Print the results of escape analysis") \ \ diff -r a3ecd773a7b9 -r 006174cfe979 src/share/vm/opto/escape.cpp --- a/src/share/vm/opto/escape.cpp Wed Oct 24 14:33:22 2012 -0700 +++ b/src/share/vm/opto/escape.cpp Thu Oct 25 17:32:03 2012 -0700 @@ -1084,7 +1084,7 @@ C->log()->text("%s", (iterations >= CG_BUILD_ITER_LIMIT) ? "iterations" : "time"); C->log()->end_elem(" limit'"); } - assert(false, err_msg_res("infinite EA connection graph build (%f sec, %d iterations) with %d nodes and worklist size %d", + assert(ExitEscapeAnalysisOnTimeout, err_msg_res("infinite EA connection graph build (%f sec, %d iterations) with %d nodes and worklist size %d", time.seconds(), iterations, nodes_size(), ptnodes_worklist.length())); // Possible infinite build_connection_graph loop, // bailout (no changes to ideal graph were made).