diff -r e01e02a9fcb6 -r e60b3fce2b02 src/cpu/zero/vm/cppInterpreter_zero.cpp --- a/src/cpu/zero/vm/cppInterpreter_zero.cpp Mon Apr 29 01:58:43 2013 -0700 +++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp Mon May 06 19:57:35 2013 -0400 @@ -212,7 +212,13 @@ // Update the invocation counter if ((UseCompiler || CountCompiledCalls) && !method->is_synchronized()) { - InvocationCounter *counter = method->invocation_counter(); + MethodCounters* mcs = method->method_counters(); + if (mcs == NULL) { + CALL_VM_NOCHECK(mcs = InterpreterRuntime::build_method_counters(thread, method)); + if (HAS_PENDING_EXCEPTION) + goto unwind_and_return; + } + InvocationCounter *counter = mcs->invocation_counter(); counter->increment(); if (counter->reached_InvocationLimit()) { CALL_VM_NOCHECK(