8212681: Refactor IC locking to use a fine grained CompiledICLocker

Reviewed-by: coleenp, rehn, kvn
This commit is contained in:
Erik Österlund 2018-11-01 14:57:26 +01:00
parent 54d4acf73f
commit 97d3dc7902
23 changed files with 211 additions and 103 deletions

View file

@ -324,7 +324,7 @@ void CompiledMethod::clear_inline_caches() {
// Clear ICStubs of all compiled ICs
void CompiledMethod::clear_ic_stubs() {
assert_locked_or_safepoint(CompiledIC_lock);
assert(CompiledICLocker::is_safe(this), "mt unsafe call");
ResourceMark rm;
RelocIterator iter(this);
while(iter.next()) {
@ -546,7 +546,7 @@ bool CompiledMethod::unload_nmethod_caches(bool parallel, bool unloading_occurre
// Called to clean up after class unloading for live nmethods and from the sweeper
// for all methods.
bool CompiledMethod::cleanup_inline_caches_impl(bool parallel, bool unloading_occurred, bool clean_all) {
assert_locked_or_safepoint(CompiledIC_lock);
assert(CompiledICLocker::is_safe(this), "mt unsafe call");
bool postponed = false;
ResourceMark rm;