1.1 --- a/src/share/vm/c1/c1_GraphBuilder.cpp Fri Jul 01 10:35:54 2011 -0700 1.2 +++ b/src/share/vm/c1/c1_GraphBuilder.cpp Fri Jul 01 10:37:37 2011 -0700 1.3 @@ -33,6 +33,7 @@ 1.4 #include "compiler/compileBroker.hpp" 1.5 #include "interpreter/bytecode.hpp" 1.6 #include "runtime/sharedRuntime.hpp" 1.7 +#include "runtime/compilationPolicy.hpp" 1.8 #include "utilities/bitMap.inline.hpp" 1.9 1.10 class BlockListBuilder VALUE_OBJ_CLASS_SPEC { 1.11 @@ -3395,8 +3396,8 @@ 1.12 1.13 bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known) { 1.14 assert(!callee->is_native(), "callee must not be native"); 1.15 - if (count_backedges() && callee->has_loops()) { 1.16 - INLINE_BAILOUT("too complex for tiered"); 1.17 + if (CompilationPolicy::policy()->should_not_inline(compilation()->env(), callee)) { 1.18 + INLINE_BAILOUT("inlining prohibited by policy"); 1.19 } 1.20 // first perform tests of things it's not possible to inline 1.21 if (callee->has_exception_handlers() &&