hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp
changeset 17000 11bf92e571a2
parent 13891 35dabd293e56
child 17130 6853aae617cb
equal deleted inserted replaced
16665:482e60f4f893 17000:11bf92e571a2
     1 /*
     1 /*
     2  * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   151   }
   151   }
   152 }
   152 }
   153 
   153 
   154 // Set carry flags on the counters if necessary
   154 // Set carry flags on the counters if necessary
   155 void SimpleThresholdPolicy::handle_counter_overflow(Method* method) {
   155 void SimpleThresholdPolicy::handle_counter_overflow(Method* method) {
   156   set_carry_if_necessary(method->invocation_counter());
   156   MethodCounters *mcs = method->method_counters();
   157   set_carry_if_necessary(method->backedge_counter());
   157   assert(mcs != NULL, "");
       
   158   set_carry_if_necessary(mcs->invocation_counter());
       
   159   set_carry_if_necessary(mcs->backedge_counter());
   158   MethodData* mdo = method->method_data();
   160   MethodData* mdo = method->method_data();
   159   if (mdo != NULL) {
   161   if (mdo != NULL) {
   160     set_carry_if_necessary(mdo->invocation_counter());
   162     set_carry_if_necessary(mdo->invocation_counter());
   161     set_carry_if_necessary(mdo->backedge_counter());
   163     set_carry_if_necessary(mdo->backedge_counter());
   162   }
   164   }