Mercurial > hg > truffle
comparison src/share/vm/runtime/simpleThresholdPolicy.cpp @ 10204:487d442ef257
8013036: vm/runtime/simpleThresholdPolicy.cpp: assert(mcs != NULL).
Summary: Change the assert to if check as MethodCounters could be NULL under TieredCompilation.
Reviewed-by: kvn, twisti
author | jiangli |
---|---|
date | Fri, 26 Apr 2013 16:21:03 -0400 |
parents | aeaca88565e6 |
children | 63a4eb8bcd23 7150b16fda52 |
comparison
equal
deleted
inserted
replaced
10201:93b8272814cf | 10204:487d442ef257 |
---|---|
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 } |