hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
changeset 4448 d6ec2737186c
parent 4013 b154310845de
child 4568 d18b14983811
--- a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Tue Nov 24 11:49:42 2009 -0800
+++ b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Fri Nov 27 07:56:58 2009 -0800
@@ -204,6 +204,20 @@
     goto unwind_and_return;
   }
 
+  // Update the invocation counter
+  if ((UseCompiler || CountCompiledCalls) && !method->is_synchronized()) {
+    thread->set_do_not_unlock();
+    InvocationCounter *counter = method->invocation_counter();
+    counter->increment();
+    if (counter->reached_InvocationLimit()) {
+      CALL_VM_NOCHECK(
+        InterpreterRuntime::frequency_counter_overflow(thread, NULL));
+      if (HAS_PENDING_EXCEPTION)
+        goto unwind_and_return;
+    }
+    thread->clr_do_not_unlock();
+  }
+
   // Lock if necessary
   BasicObjectLock *monitor;
   monitor = NULL;