hotspot/src/share/vm/c1/c1_Runtime1.cpp
changeset 10014 a5c2141ee857
parent 9318 c7acc13a9226
child 10508 233d2e7c462d
--- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp	Fri Jul 01 10:35:54 2011 -0700
+++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp	Fri Jul 01 10:37:37 2011 -0700
@@ -383,8 +383,10 @@
   }
 JRT_END
 
-// This is a helper to allow us to safepoint but allow the outer entry
-// to be safepoint free if we need to do an osr
+// counter_overflow() is called from within C1-compiled methods. The enclosing method is the method
+// associated with the top activation record. The inlinee (that is possibly included in the enclosing
+// method) method oop is passed as an argument. In order to do that it is embedded in the code as
+// a constant.
 static nmethod* counter_overflow_helper(JavaThread* THREAD, int branch_bci, methodOopDesc* m) {
   nmethod* osr_nm = NULL;
   methodHandle method(THREAD, m);
@@ -420,7 +422,7 @@
     bci = branch_bci + offset;
   }
 
-  osr_nm = CompilationPolicy::policy()->event(enclosing_method, method, branch_bci, bci, level, THREAD);
+  osr_nm = CompilationPolicy::policy()->event(enclosing_method, method, branch_bci, bci, level, nm, THREAD);
   return osr_nm;
 }