8151874: [JVMCI] canInlineMethod should check is_not_compilable for correct CompLevel
Reviewed-by: twisti
--- a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp Thu Mar 17 17:03:20 2016 +0000
+++ b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp Thu Mar 17 12:04:04 2016 -0700
@@ -448,7 +448,10 @@
C2V_VMENTRY(jboolean, canInlineMethod,(JNIEnv *, jobject, jobject jvmci_method))
methodHandle method = CompilerToVM::asMethod(jvmci_method);
- return !method->is_not_compilable() && !CompilerOracle::should_not_inline(method) && !method->dont_inline();
+ // In hosted mode ignore the not_compilable flags since they are never set by
+ // the JVMCI compiler.
+ bool is_compilable = UseJVMCICompiler ? !method->is_not_compilable(CompLevel_full_optimization) : true;
+ return is_compilable && !CompilerOracle::should_not_inline(method) && !method->dont_inline();
C2V_END
C2V_VMENTRY(jboolean, shouldInlineMethod,(JNIEnv *, jobject, jobject jvmci_method))