diff options
author | vlivanov <none@none> | 2014-03-28 10:12:48 -0700 |
---|---|---|
committer | vlivanov <none@none> | 2014-03-28 10:12:48 -0700 |
commit | b9d6a3d73dd74e661f065c3ad21a2c514fc3844b (patch) | |
tree | ae77b9fb13e063043da5e442089db4ace140ed56 /src/share/vm | |
parent | 385ac7a05af437a2bea478e2be07bb441bf3e984 (diff) |
8035887: VM crashes trying to force inlining the recursive call
Reviewed-by: kvn, twisti
Diffstat (limited to 'src/share/vm')
-rw-r--r-- | src/share/vm/c1/c1_GraphBuilder.cpp | 13 | ||||
-rw-r--r-- | src/share/vm/runtime/globals.hpp | 3 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/share/vm/c1/c1_GraphBuilder.cpp b/src/share/vm/c1/c1_GraphBuilder.cpp index 8d7d4e36d..b350e7357 100644 --- a/src/share/vm/c1/c1_GraphBuilder.cpp +++ b/src/share/vm/c1/c1_GraphBuilder.cpp @@ -3767,11 +3767,14 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known, Bytecode } // now perform tests that are based on flag settings - if (callee->force_inline()) { - if (inline_level() > MaxForceInlineLevel) INLINE_BAILOUT("MaxForceInlineLevel"); - print_inlining(callee, "force inline by annotation"); - } else if (callee->should_inline()) { - print_inlining(callee, "force inline by CompileOracle"); + if (callee->force_inline() || callee->should_inline()) { + if (inline_level() > MaxForceInlineLevel ) INLINE_BAILOUT("MaxForceInlineLevel"); + if (recursive_inline_level(callee) > MaxRecursiveInlineLevel) INLINE_BAILOUT("recursive inlining too deep"); + + const char* msg = ""; + if (callee->force_inline()) msg = "force inline by annotation"; + if (callee->should_inline()) msg = "force inline by CompileOracle"; + print_inlining(callee, msg); } else { // use heuristic controls on inlining if (inline_level() > MaxInlineLevel ) INLINE_BAILOUT("inlining too deep"); diff --git a/src/share/vm/runtime/globals.hpp b/src/share/vm/runtime/globals.hpp index 7a6958f8f..2e971e1f3 100644 --- a/src/share/vm/runtime/globals.hpp +++ b/src/share/vm/runtime/globals.hpp @@ -2986,7 +2986,8 @@ class CommandLineFlags { "maximum number of nested recursive calls that are inlined") \ \ develop(intx, MaxForceInlineLevel, 100, \ - "maximum number of nested @ForceInline calls that are inlined") \ + "maximum number of nested calls that are forced for inlining " \ + "(using CompilerOracle or marked w/ @ForceInline)") \ \ product_pd(intx, InlineSmallCode, \ "Only inline already compiled methods if their code size is " \ |