Merge
authornever
Mon, 02 May 2011 10:51:36 -0700
changeset 9436 2a355fa03145
parent 9435 b16821523fe3 (diff)
parent 9347 de80080e77a6 (current diff)
child 9437 9981851b4b8c
Merge
hotspot/make/linux/makefiles/cscope.make
hotspot/make/solaris/makefiles/cscope.make
jdk/src/share/classes/sun/security/ssl/DefaultSSLContextImpl.java
jdk/src/share/native/sun/font/layout/Features.h
jdk/test/javax/swing/text/GlyphView/6539700/bug6539700.java
langtools/src/share/classes/com/sun/source/tree/DisjunctiveTypeTree.java
langtools/src/share/classes/javax/lang/model/type/DisjunctiveType.java
--- a/hotspot/src/share/vm/opto/bytecodeInfo.cpp	Fri Apr 29 17:00:19 2011 -0700
+++ b/hotspot/src/share/vm/opto/bytecodeInfo.cpp	Mon May 02 10:51:36 2011 -0700
@@ -310,13 +310,14 @@
     return "inlining too deep";
   }
 
-  // We need to detect recursive inlining of method handle targets: if
-  // the current method is a method handle adapter and one of the
-  // callers is the same method as the callee, we bail out if
-  // MaxRecursiveInlineLevel is hit.
-  if (method()->is_method_handle_adapter()) {
+  // detect direct and indirect recursive inlining
+  {
+    // count the current method and the callee
+    int inline_level = (method() == callee_method) ? 1 : 0;
+    if (inline_level > MaxRecursiveInlineLevel)
+      return "recursively inlining too deep";
+    // count callers of current method and callee
     JVMState* jvms = caller_jvms();
-    int inline_level = 0;
     while (jvms != NULL && jvms->has_method()) {
       if (jvms->method() == callee_method) {
         inline_level++;
@@ -327,10 +328,6 @@
     }
   }
 
-  if (method() == callee_method && inline_depth() > MaxRecursiveInlineLevel) {
-    return "recursively inlining too deep";
-  }
-
   int size = callee_method->code_size();
 
   if (UseOldInlining && ClipInlining
--- a/hotspot/src/share/vm/opto/loopTransform.cpp	Fri Apr 29 17:00:19 2011 -0700
+++ b/hotspot/src/share/vm/opto/loopTransform.cpp	Mon May 02 10:51:36 2011 -0700
@@ -632,6 +632,8 @@
 }
 
 
+#define MAX_UNROLL 16 // maximum number of unrolls for main loop
+
 //------------------------------policy_unroll----------------------------------
 // Return TRUE or FALSE if the loop should be unrolled or not.  Unroll if
 // the loop is a CountedLoop and the body is small enough.
@@ -646,10 +648,11 @@
   // protect against over-unrolling
   if (cl->trip_count() <= 1) return false;
 
-  // Check for stride being a small enough constant
-  if (abs(cl->stride_con()) > (1<<3)) return false;
+  int future_unroll_ct = cl->unrolled_count() * 2;
+  if (future_unroll_ct > MAX_UNROLL) return false;
 
-  int future_unroll_ct = cl->unrolled_count() * 2;
+  // Check for initial stride being a small enough constant
+  if (abs(cl->stride_con()) > (1<<2)*future_unroll_ct) return false;
 
   // Don't unroll if the next round of unrolling would push us
   // over the expected trip count of the loop.  One is subtracted