# HG changeset patch # User coleenp # Date 1237601328 14400 # Node ID c664a0794f85f7dece476e97d5677ed4257d26ec # Parent e55bcaf3a6a1d0e90aeede98ca9e5918829f0ff2 6805748: Assertion "don't reset to 0 -- could be mistaken for never-executed" in CompilationPolicy Summary: Resetting the invocation counter for a method invocation event was setting count to zero for CompileThreshold=1, making it look like a never executed method. Reviewed-by: phh, kamg, acorn, never diff -r e55bcaf3a6a1 -r c664a0794f85 src/share/vm/interpreter/invocationCounter.cpp --- a/src/share/vm/interpreter/invocationCounter.cpp Fri Mar 20 11:23:24 2009 -0400 +++ b/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); }