7163534: VM could crashes assert(false) failed: infinite EA connection graph build

Thu, 25 Oct 2012 17:32:03 -0700

author
kvn
date
Thu, 25 Oct 2012 17:32:03 -0700
changeset 4206
006174cfe979
parent 4205
a3ecd773a7b9
child 4207
410afdc6a07c

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

src/share/vm/opto/c2_globals.hpp file | annotate | diff | comparison | revisions
src/share/vm/opto/escape.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/opto/c2_globals.hpp	Wed Oct 24 14:33:22 2012 -0700
     1.2 +++ b/src/share/vm/opto/c2_globals.hpp	Thu Oct 25 17:32:03 2012 -0700
     1.3 @@ -439,6 +439,9 @@
     1.4    product(bool, DoEscapeAnalysis, true,                                     \
     1.5            "Perform escape analysis")                                        \
     1.6                                                                              \
     1.7 +  develop(bool, ExitEscapeAnalysisOnTimeout, true,                          \
     1.8 +          "Exit or throw assert in EA when it reaches time limit")          \
     1.9 +                                                                            \
    1.10    notproduct(bool, PrintEscapeAnalysis, false,                              \
    1.11            "Print the results of escape analysis")                           \
    1.12                                                                              \
     2.1 --- a/src/share/vm/opto/escape.cpp	Wed Oct 24 14:33:22 2012 -0700
     2.2 +++ b/src/share/vm/opto/escape.cpp	Thu Oct 25 17:32:03 2012 -0700
     2.3 @@ -1084,7 +1084,7 @@
     2.4        C->log()->text("%s", (iterations >= CG_BUILD_ITER_LIMIT) ? "iterations" : "time");
     2.5        C->log()->end_elem(" limit'");
     2.6      }
     2.7 -    assert(false, err_msg_res("infinite EA connection graph build (%f sec, %d iterations) with %d nodes and worklist size %d",
     2.8 +    assert(ExitEscapeAnalysisOnTimeout, err_msg_res("infinite EA connection graph build (%f sec, %d iterations) with %d nodes and worklist size %d",
     2.9             time.seconds(), iterations, nodes_size(), ptnodes_worklist.length()));
    2.10      // Possible infinite build_connection_graph loop,
    2.11      // bailout (no changes to ideal graph were made).

mercurial