8151874: [JVMCI] canInlineMethod should check is_not_compilable for correct CompLevel
authornever
Thu, 17 Mar 2016 12:04:04 -0700
changeset 36800 37014ee7264c
parent 36799 982e1880e05e
child 36801 308bbcba639c
child 36802 18b1db5a7e70
8151874: [JVMCI] canInlineMethod should check is_not_compilable for correct CompLevel Reviewed-by: twisti
hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp
--- 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))