8014959: assert(Compile::current()->live_nodes() < (uint)MaxNodeLimit) failed: Live Node limit exceeded limit

Tue, 11 Jun 2013 16:34:34 -0400

author
drchase
date
Tue, 11 Jun 2013 16:34:34 -0400
changeset 5285
693e4d04fd09
parent 5283
46c544b8fbfc
child 5286
bc8956037049

8014959: assert(Compile::current()->live_nodes() < (uint)MaxNodeLimit) failed: Live Node limit exceeded limit
Summary: Insert extra checks and bailouts for too many nodes
Reviewed-by: kvn

src/share/vm/opto/c2_globals.hpp file | annotate | diff | comparison | revisions
src/share/vm/opto/chaitin.cpp file | annotate | diff | comparison | revisions
src/share/vm/opto/coalesce.cpp file | annotate | diff | comparison | revisions
src/share/vm/opto/matcher.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/opto/c2_globals.hpp	Fri Jun 07 16:46:37 2013 -0700
     1.2 +++ b/src/share/vm/opto/c2_globals.hpp	Tue Jun 11 16:34:34 2013 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -406,10 +406,10 @@
    1.11    develop(intx, WarmCallMaxSize, 999999,                                    \
    1.12            "size of the largest inlinable method")                           \
    1.13                                                                              \
    1.14 -  product(intx, MaxNodeLimit, 65000,                                        \
    1.15 +  product(intx, MaxNodeLimit, 80000,                                        \
    1.16            "Maximum number of nodes")                                        \
    1.17                                                                              \
    1.18 -  product(intx, NodeLimitFudgeFactor, 1000,                                 \
    1.19 +  product(intx, NodeLimitFudgeFactor, 2000,                                 \
    1.20            "Fudge Factor for certain optimizations")                         \
    1.21                                                                              \
    1.22    product(bool, UseJumpTables, true,                                        \
     2.1 --- a/src/share/vm/opto/chaitin.cpp	Fri Jun 07 16:46:37 2013 -0700
     2.2 +++ b/src/share/vm/opto/chaitin.cpp	Tue Jun 11 16:34:34 2013 -0400
     2.3 @@ -1,5 +1,5 @@
     2.4  /*
     2.5 - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
     2.6 + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
     2.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8   *
     2.9   * This code is free software; you can redistribute it and/or modify it
    2.10 @@ -435,6 +435,9 @@
    2.11      // Insert un-coalesced copies.  Visit all Phis.  Where inputs to a Phi do
    2.12      // not match the Phi itself, insert a copy.
    2.13      coalesce.insert_copies(_matcher);
    2.14 +    if (C->failing()) {
    2.15 +      return;
    2.16 +    }
    2.17    }
    2.18  
    2.19    // After aggressive coalesce, attempt a first cut at coloring.
     3.1 --- a/src/share/vm/opto/coalesce.cpp	Fri Jun 07 16:46:37 2013 -0700
     3.2 +++ b/src/share/vm/opto/coalesce.cpp	Tue Jun 11 16:34:34 2013 -0400
     3.3 @@ -1,5 +1,5 @@
     3.4  /*
     3.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
     3.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     3.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.8   *
     3.9   * This code is free software; you can redistribute it and/or modify it
    3.10 @@ -240,6 +240,8 @@
    3.11    _unique = C->unique();
    3.12  
    3.13    for( uint i=0; i<_phc._cfg._num_blocks; i++ ) {
    3.14 +    C->check_node_count(NodeLimitFudgeFactor, "out of nodes in coalesce");
    3.15 +    if (C->failing()) return;
    3.16      Block *b = _phc._cfg._blocks[i];
    3.17      uint cnt = b->num_preds();  // Number of inputs to the Phi
    3.18  
     4.1 --- a/src/share/vm/opto/matcher.cpp	Fri Jun 07 16:46:37 2013 -0700
     4.2 +++ b/src/share/vm/opto/matcher.cpp	Tue Jun 11 16:34:34 2013 -0400
     4.3 @@ -1,5 +1,5 @@
     4.4  /*
     4.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     4.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     4.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.8   *
     4.9   * This code is free software; you can redistribute it and/or modify it
    4.10 @@ -985,6 +985,8 @@
    4.11    mstack.push(n, Visit, NULL, -1);  // set NULL as parent to indicate root
    4.12  
    4.13    while (mstack.is_nonempty()) {
    4.14 +    C->check_node_count(NodeLimitFudgeFactor, "too many nodes matching instructions");
    4.15 +    if (C->failing()) return NULL;
    4.16      n = mstack.node();          // Leave node on stack
    4.17      Node_State nstate = mstack.state();
    4.18      if (nstate == Visit) {

mercurial