diff -r 67b04a68b881 -r 9989add27bf4 hotspot/src/share/vm/code/nmethod.cpp --- a/hotspot/src/share/vm/code/nmethod.cpp Sun Apr 03 21:44:54 2016 -0700 +++ b/hotspot/src/share/vm/code/nmethod.cpp Tue Apr 05 01:46:40 2016 -0700 @@ -1138,8 +1138,7 @@ } } - -void nmethod::cleanup_inline_caches() { +void nmethod::cleanup_inline_caches(bool clean_all/*=false*/) { assert_locked_or_safepoint(CompiledIC_lock); // If the method is not entrant or zombie then a JMP is plastered over the @@ -1169,7 +1168,7 @@ if( cb != NULL && cb->is_nmethod() ) { nmethod* nm = (nmethod*)cb; // Clean inline caches pointing to zombie, non-entrant and unloaded methods - if (!nm->is_in_use() || (nm->method()->code() != nm)) ic->set_to_clean(is_alive()); + if (clean_all || !nm->is_in_use() || (nm->method()->code() != nm)) ic->set_to_clean(is_alive()); } break; } @@ -1179,7 +1178,7 @@ if( cb != NULL && cb->is_nmethod() ) { nmethod* nm = (nmethod*)cb; // Clean inline caches pointing to zombie, non-entrant and unloaded methods - if (!nm->is_in_use() || (nm->method()->code() != nm)) csc->set_to_clean(); + if (clean_all || !nm->is_in_use() || (nm->method()->code() != nm)) csc->set_to_clean(); } break; }