8186235: [Graal] compiler/aot/RecompilationTest.java fails in case UseJVMCICompiler is enabled
authoriveresov
Tue, 22 Aug 2017 08:53:35 -0700
changeset 46945 f3a636ac46e4
parent 46944 fcd792874f22
child 46948 2c848d273564
child 46949 44ccdba2d72e
8186235: [Graal] compiler/aot/RecompilationTest.java fails in case UseJVMCICompiler is enabled Summary: Make JVMCI respect -XX:-Inline Reviewed-by: kvn
hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp
hotspot/test/compiler/aot/RecompilationTest.java
--- a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp	Tue Aug 22 17:24:40 2017 +0300
+++ b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp	Tue Aug 22 08:53:35 2017 -0700
@@ -765,7 +765,7 @@
 
 C2V_VMENTRY(jboolean, hasNeverInlineDirective,(JNIEnv *, jobject, jobject jvmci_method))
   methodHandle method = CompilerToVM::asMethod(jvmci_method);
-  return CompilerOracle::should_not_inline(method) || method->dont_inline();
+  return !Inline || CompilerOracle::should_not_inline(method) || method->dont_inline();
 C2V_END
 
 C2V_VMENTRY(jboolean, shouldInlineMethod,(JNIEnv *, jobject, jobject jvmci_method))
--- a/hotspot/test/compiler/aot/RecompilationTest.java	Tue Aug 22 17:24:40 2017 +0300
+++ b/hotspot/test/compiler/aot/RecompilationTest.java	Tue Aug 22 08:53:35 2017 -0700
@@ -37,7 +37,7 @@
  *     -extraopt -XX:+UnlockDiagnosticVMOptions -extraopt -XX:+WhiteBoxAPI -extraopt -Xbootclasspath/a:.
  *     -extraopt -XX:-UseCompressedOops
  *     -extraopt -XX:CompileCommand=dontinline,compiler.whitebox.SimpleTestCaseHelper::*
- * @run main/othervm -Xmixed -Xbatch -XX:+UseAOT -XX:+TieredCompilation
+ * @run main/othervm -Xmixed -Xbatch -XX:+UseAOT -XX:+TieredCompilation -XX:CompilationPolicyChoice=2
  *     -XX:-UseCounterDecay -XX:-UseCompressedOops
  *     -XX:-Inline
  *     -XX:AOTLibrary=./libRecompilationTest1.so -Xbootclasspath/a:.
@@ -50,7 +50,7 @@
  *     -extraopt -XX:+UnlockDiagnosticVMOptions -extraopt -XX:+WhiteBoxAPI -extraopt -Xbootclasspath/a:.
  *     -extraopt -XX:-UseCompressedOops
  *     -extraopt -XX:CompileCommand=dontinline,compiler.whitebox.SimpleTestCaseHelper::*
- * @run main/othervm -Xmixed -Xbatch -XX:+UseAOT -XX:+TieredCompilation
+ * @run main/othervm -Xmixed -Xbatch -XX:+UseAOT -XX:+TieredCompilation -XX:CompilationPolicyChoice=2
  *     -XX:-UseCounterDecay -XX:-UseCompressedOops
  *     -XX:-Inline
  *     -XX:AOTLibrary=./libRecompilationTest2.so -Xbootclasspath/a:.