hotspot/src/share/vm/ci/ciReplay.cpp
changeset 17000 11bf92e571a2
parent 15483 113ca9e9c1bb
child 17121 e40a97c700d9
--- a/hotspot/src/share/vm/ci/ciReplay.cpp	Thu Apr 04 21:15:43 2013 -0700
+++ b/hotspot/src/share/vm/ci/ciReplay.cpp	Tue Apr 09 17:17:41 2013 -0400
@@ -920,12 +920,17 @@
     method->print_name(tty);
     tty->cr();
   } else {
+    EXCEPTION_CONTEXT;
+    MethodCounters* mcs = method->method_counters();
     // m->_instructions_size = rec->instructions_size;
     m->_instructions_size = -1;
     m->_interpreter_invocation_count = rec->interpreter_invocation_count;
     m->_interpreter_throwout_count = rec->interpreter_throwout_count;
-    method->invocation_counter()->_counter = rec->invocation_counter;
-    method->backedge_counter()->_counter = rec->backedge_counter;
+    if (mcs == NULL) {
+      mcs = Method::build_method_counters(method, CHECK_AND_CLEAR);
+    }
+    mcs->invocation_counter()->_counter = rec->invocation_counter;
+    mcs->backedge_counter()->_counter = rec->backedge_counter;
   }
 }