hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp
changeset 17000 11bf92e571a2
parent 13891 35dabd293e56
child 17130 6853aae617cb
--- a/hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp	Thu Apr 04 21:15:43 2013 -0700
+++ b/hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp	Tue Apr 09 17:17:41 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -153,8 +153,10 @@
 
 // Set carry flags on the counters if necessary
 void SimpleThresholdPolicy::handle_counter_overflow(Method* method) {
-  set_carry_if_necessary(method->invocation_counter());
-  set_carry_if_necessary(method->backedge_counter());
+  MethodCounters *mcs = method->method_counters();
+  assert(mcs != NULL, "");
+  set_carry_if_necessary(mcs->invocation_counter());
+  set_carry_if_necessary(mcs->backedge_counter());
   MethodData* mdo = method->method_data();
   if (mdo != NULL) {
     set_carry_if_necessary(mdo->invocation_counter());