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 MethodCounters *mcs = method->method_counters(); |
156 MethodCounters *mcs = method->method_counters(); |
157 assert(mcs != NULL, ""); |
157 if (mcs != NULL) { |
158 set_carry_if_necessary(mcs->invocation_counter()); |
158 set_carry_if_necessary(mcs->invocation_counter()); |
159 set_carry_if_necessary(mcs->backedge_counter()); |
159 set_carry_if_necessary(mcs->backedge_counter()); |
|
160 } |
160 MethodData* mdo = method->method_data(); |
161 MethodData* mdo = method->method_data(); |
161 if (mdo != NULL) { |
162 if (mdo != NULL) { |
162 set_carry_if_necessary(mdo->invocation_counter()); |
163 set_carry_if_necessary(mdo->invocation_counter()); |
163 set_carry_if_necessary(mdo->backedge_counter()); |
164 set_carry_if_necessary(mdo->backedge_counter()); |
164 } |
165 } |