提交 1d896fc1 编写于 作者: C coleenp

8014024: NPG: keep compiled ic methods from being deallocated in redefine classes

Summary: Walk the compiledIC relocation records to keep Method* from being deallocated.
Reviewed-by: dlong, kvn
上级 7ef1f195
......@@ -1794,6 +1794,19 @@ void nmethod::metadata_do(void f(Metadata*)) {
Metadata* md = r->metadata_value();
f(md);
}
} else if (iter.type() == relocInfo::virtual_call_type) {
// Check compiledIC holders associated with this nmethod
CompiledIC *ic = CompiledIC_at(iter.reloc());
if (ic->is_icholder_call()) {
CompiledICHolder* cichk = ic->cached_icholder();
f(cichk->holder_method());
f(cichk->holder_klass());
} else {
Metadata* ic_oop = ic->cached_metadata();
if (ic_oop != NULL) {
f(ic_oop);
}
}
}
}
}
......@@ -1804,6 +1817,7 @@ void nmethod::metadata_do(void f(Metadata*)) {
Metadata* md = *p;
f(md);
}
// Call function Method*, not embedded in these other places.
if (_method != NULL) f(_method);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册