# HG changeset patch # User Miguel Garcia # Date 1400244292 -7200 # Node ID eee32e28151a4b9363d89257661ba19dd1b6b58f # Parent 8e2ed3a0812ad4fbb28642e9e2461a8599812e59 [inlining] reduced verbosity in checkTargetConditions() diff -r 8e2ed3a0812a -r eee32e28151a graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java Fri May 16 13:39:12 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java Fri May 16 14:44:52 2014 +0200 @@ -482,22 +482,27 @@ } private static boolean checkTargetConditions(InliningData data, Replacements replacements, Invoke invoke, ResolvedJavaMethod method, OptimisticOptimizations optimisticOpts) { + String failureMessage = null; if (method == null) { - return logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, "the method is not resolved"); + failureMessage = "the method is not resolved"; } else if (method.isNative() && (!Intrinsify.getValue() || !InliningUtil.canIntrinsify(replacements, method))) { - return logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, "it is a non-intrinsic native method"); + failureMessage = "it is a non-intrinsic native method"; } else if (method.isAbstract()) { - return logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, "it is an abstract method"); + failureMessage = "it is an abstract method"; } else if (!method.getDeclaringClass().isInitialized()) { - return logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, "the method's class is not initialized"); + failureMessage = "the method's class is not initialized"; } else if (!method.canBeInlined()) { - return logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, "it is marked non-inlinable"); + failureMessage = "it is marked non-inlinable"; } else if (data.countRecursiveInlining(method) > MaximumRecursiveInlining.getValue()) { - return logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, "it exceeds the maximum recursive inlining depth"); + failureMessage = "it exceeds the maximum recursive inlining depth"; } else if (new OptimisticOptimizations(method.getProfilingInfo()).lessOptimisticThan(optimisticOpts)) { - return logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, "the callee uses less optimistic optimizations than caller"); + failureMessage = "the callee uses less optimistic optimizations than caller"; + } + if (failureMessage == null) { + return true; } else { - return true; + logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, failureMessage); + return false; } }