changeset 10500:d28f025a1f80

8151874: [JVMCI] canInlineMethod should check is_not_compilable for correct CompLevel Reviewed-by: twisti
author never
date Thu, 17 Mar 2016 12:04:04 -0700
parents 7c31312c5725
children eb774f6f1077 abe0f7310cc4
files src/share/vm/jvmci/jvmciCompilerToVM.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/jvmci/jvmciCompilerToVM.cpp	Thu Mar 17 17:03:20 2016 +0000
+++ b/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))