1059 CompiledMethod* nm = iter.method(); |
1059 CompiledMethod* nm = iter.method(); |
1060 if (nm->is_marked_for_deoptimization()) { |
1060 if (nm->is_marked_for_deoptimization()) { |
1061 // ...Already marked in the previous pass; count it here. |
1061 // ...Already marked in the previous pass; count it here. |
1062 // Also counts AOT compiled methods, already marked. |
1062 // Also counts AOT compiled methods, already marked. |
1063 number_of_marked_CodeBlobs++; |
1063 number_of_marked_CodeBlobs++; |
1064 } else if (nm->is_evol_dependent()) { |
1064 } else if (nm->has_evol_metadata()) { |
1065 ResourceMark rm; |
1065 ResourceMark rm; |
1066 nm->mark_for_deoptimization(); |
1066 nm->mark_for_deoptimization(); |
1067 number_of_marked_CodeBlobs++; |
1067 number_of_marked_CodeBlobs++; |
1068 } else { |
1068 } else { |
1069 // flush caches in case they refer to a redefined Method* |
1069 // Inline caches that refer to an nmethod are deoptimized already, because |
1070 nm->clear_inline_caches(); |
1070 // the Method* is walked in the metadata section of the nmethod. |
|
1071 assert(!nm->is_evol_dependent(), "should no longer be necessary"); |
1071 } |
1072 } |
1072 } |
1073 } |
1073 |
1074 |
1074 // return total count of nmethods marked for deoptimization, if zero the caller |
1075 // return total count of nmethods marked for deoptimization, if zero the caller |
1075 // can skip deoptimization |
1076 // can skip deoptimization |