diff --git a/src/share/vm/runtime/compilationPolicy.cpp b/src/share/vm/runtime/compilationPolicy.cpp index cec42ae919583462449cf0762730e5419b5d7d62..3d670d6a2978a1b5de2a14b5704600952f6e7cc8 100644 --- a/src/share/vm/runtime/compilationPolicy.cpp +++ b/src/share/vm/runtime/compilationPolicy.cpp @@ -297,9 +297,10 @@ void NonTieredCompPolicy::reprofile(ScopeDesc* trap_scope, bool is_osr) { // that it's recommended to delay the complation of this method. void NonTieredCompPolicy::delay_compilation(Method* method) { MethodCounters* mcs = method->method_counters(); - assert(mcs != NULL, "MethodCounters cannot be NULL"); - mcs->invocation_counter()->decay(); - mcs->backedge_counter()->decay(); + if (mcs != NULL) { + mcs->invocation_counter()->decay(); + mcs->backedge_counter()->decay(); + } } void NonTieredCompPolicy::disable_compilation(Method* method) {