changeset 48199:0c88cd009b5f

8160548: Inconsistent inlining behavior with CompileOnly Summary: can_be_compiled should not affect inlining Reviewed-by: thartmann
author neliasso
date Mon, 20 Nov 2017 09:50:27 +0100
parents 600868bd3a8c
children e1ec73e3325e
files src/hotspot/share/opto/bytecodeInfo.cpp src/hotspot/share/opto/parse1.cpp test/hotspot/jtreg/compiler/whitebox/DeoptimizeFramesTest.java
diffstat 3 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/opto/bytecodeInfo.cpp	Wed Oct 11 11:24:59 2017 +0200
+++ b/src/hotspot/share/opto/bytecodeInfo.cpp	Mon Nov 20 09:50:27 2017 +0100
@@ -478,7 +478,6 @@
   // Certain methods cannot be parsed at all:
   if ( callee->is_native())                     return "native method";
   if ( callee->is_abstract())                   return "abstract method";
-  if (!callee->can_be_compiled())               return "not compilable (disabled)";
   if (!callee->has_balanced_monitors())         return "not compilable (unbalanced monitors)";
   if ( callee->get_flow_analysis()->failing())  return "not compilable (flow analysis failed)";
   return NULL;
--- a/src/hotspot/share/opto/parse1.cpp	Wed Oct 11 11:24:59 2017 +0200
+++ b/src/hotspot/share/opto/parse1.cpp	Mon Nov 20 09:50:27 2017 +0100
@@ -487,7 +487,7 @@
     log->elem("observe that='has_exception_handlers'");
   }
 
-  assert(method()->can_be_compiled(),       "Can not parse this method, cutout earlier");
+  assert(InlineTree::check_can_parse(method()) == NULL, "Can not parse this method, cutout earlier");
   assert(method()->has_balanced_monitors(), "Can not parse unbalanced monitors, cutout earlier");
 
   // Always register dependence if JVMTI is enabled, because
--- a/test/hotspot/jtreg/compiler/whitebox/DeoptimizeFramesTest.java	Wed Oct 11 11:24:59 2017 +0200
+++ b/test/hotspot/jtreg/compiler/whitebox/DeoptimizeFramesTest.java	Mon Nov 20 09:50:27 2017 +0100
@@ -39,6 +39,7 @@
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+WhiteBoxAPI -Xmixed -XX:-UseCounterDecay
  *                   -XX:CompileCommand=compileonly,compiler.whitebox.DeoptimizeFramesTest$TestCaseImpl::method
+ *                   -XX:CompileCommand=dontinline,java.util.concurrent.Phaser::*
  *                   -XX:+IgnoreUnrecognizedVMOptions -XX:-DeoptimizeRandom -XX:-DeoptimizeALot
  *                   compiler.whitebox.DeoptimizeFramesTest false
  */
@@ -110,6 +111,7 @@
                         String.format("compilation %d can't be available", nm.compile_id));
             }
         } else {
+            Asserts.assertNE(nm2, null, "must not be null");
             Asserts.assertEQ(nm.compile_id, nm2.compile_id, "should be the same nmethod");
         }
     }