diff src/share/vm/c1/c1_LIRGenerator.cpp @ 4137:04b9a2566eec

Merge with hsx23/hotspot.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sat, 17 Dec 2011 21:40:27 +0100
parents be4ca325525a 973293defacd
children 33df1aeaebbf
line wrap: on
line diff
--- a/src/share/vm/c1/c1_LIRGenerator.cpp	Sat Dec 17 20:50:09 2011 +0100
+++ b/src/share/vm/c1/c1_LIRGenerator.cpp	Sat Dec 17 21:40:27 2011 +0100
@@ -429,7 +429,7 @@
         // all locals are dead on exit from the synthetic unlocker
         liveness.clear();
       } else {
-        assert(x->as_MonitorEnter(), "only other case is MonitorEnter");
+        assert(x->as_MonitorEnter() || x->as_ProfileInvoke(), "only other cases are MonitorEnter and ProfileInvoke");
       }
     }
     if (!liveness.is_valid()) {
@@ -2493,7 +2493,7 @@
 
     // increment backedge counter if needed
     CodeEmitInfo* info = state_for(x, state);
-    increment_backedge_counter(info, info->stack()->bci());
+    increment_backedge_counter(info, x->profiled_bci());
     CodeEmitInfo* safepoint_info = state_for(x, state);
     __ safepoint(safepoint_poll_register(), safepoint_info);
   }
@@ -2970,8 +2970,8 @@
   // accessors are also always mature.
   if (!x->inlinee()->is_accessor()) {
     CodeEmitInfo* info = state_for(x, x->state(), true);
-    // Increment invocation counter, don't notify the runtime, because we don't inline loops,
-    increment_event_counter_impl(info, x->inlinee(), 0, InvocationEntryBci, false, false);
+    // Notify the runtime very infrequently only to take care of counter overflows
+    increment_event_counter_impl(info, x->inlinee(), (1 << Tier23InlineeNotifyFreqLog) - 1, InvocationEntryBci, false, true);
   }
 }