hotspot/src/share/vm/interpreter/invocationCounter.cpp
changeset 2266 fe08ea2948cf
parent 1 489c9b5090e2
child 3261 c7d5aae8d3f7
--- a/hotspot/src/share/vm/interpreter/invocationCounter.cpp	Fri Mar 20 11:23:24 2009 -0400
+++ b/hotspot/src/share/vm/interpreter/invocationCounter.cpp	Fri Mar 20 22:08:48 2009 -0400
@@ -47,6 +47,8 @@
   // executed many more times before re-entering the VM.
   int old_count = count();
   int new_count = MIN2(old_count, (int) (CompileThreshold / 2));
+  // prevent from going to zero, to distinguish from never-executed methods
+  if (new_count == 0)  new_count = 1;
   if (old_count != new_count)  set(state(), new_count);
 }