comparison src/share/vm/runtime/compilationPolicy.cpp @ 10106:42a42da29fd7

8012052: java/lang/invoke/6987555/Test6987555.java crashes with assert(mcs != NULL) failed: MethodCounters cannot be NULL. Summary: Skip counter decay if the MethodCounters is NULL in NonTieredCompPolicy::delay_compilation(). Reviewed-by: kvn, dholmes
author jiangli
date Thu, 11 Apr 2013 23:06:33 -0400
parents aeaca88565e6
children 8df6ddda8090
comparison
equal deleted inserted replaced
10105:aeaca88565e6 10106:42a42da29fd7
295 295
296 // This method can be called by any component of the runtime to notify the policy 296 // This method can be called by any component of the runtime to notify the policy
297 // that it's recommended to delay the complation of this method. 297 // that it's recommended to delay the complation of this method.
298 void NonTieredCompPolicy::delay_compilation(Method* method) { 298 void NonTieredCompPolicy::delay_compilation(Method* method) {
299 MethodCounters* mcs = method->method_counters(); 299 MethodCounters* mcs = method->method_counters();
300 assert(mcs != NULL, "MethodCounters cannot be NULL"); 300 if (mcs != NULL) {
301 mcs->invocation_counter()->decay(); 301 mcs->invocation_counter()->decay();
302 mcs->backedge_counter()->decay(); 302 mcs->backedge_counter()->decay();
303 }
303 } 304 }
304 305
305 void NonTieredCompPolicy::disable_compilation(Method* method) { 306 void NonTieredCompPolicy::disable_compilation(Method* method) {
306 MethodCounters* mcs = method->method_counters(); 307 MethodCounters* mcs = method->method_counters();
307 if (mcs != NULL) { 308 if (mcs != NULL) {