From 2b48dbfd93326ed5b7ee6339e270a3857da06913 Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Thu, 17 Mar 2016 12:04:04 -0700 Subject: [PATCH] 8151874: [JVMCI] canInlineMethod should check is_not_compilable for correct CompLevel Reviewed-by: twisti --- hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp index a444c909e9e..eae731ca7cf 100644 --- a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp +++ b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp @@ -448,7 +448,10 @@ C2V_END 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))