--- a/src/hotspot/share/code/relocInfo.cpp Wed Dec 05 17:33:01 2018 +0000
+++ b/src/hotspot/share/code/relocInfo.cpp Wed Dec 05 15:57:26 2018 +0100
@@ -644,12 +644,12 @@
return (Method*)m;
}
-void virtual_call_Relocation::clear_inline_cache() {
+bool virtual_call_Relocation::clear_inline_cache() {
// No stubs for ICs
// Clean IC
ResourceMark rm;
CompiledIC* icache = CompiledIC_at(this);
- icache->set_to_clean();
+ return icache->set_to_clean();
}
@@ -672,15 +672,20 @@
return (Method*)m;
}
-void opt_virtual_call_Relocation::clear_inline_cache() {
+template<typename CompiledICorStaticCall>
+static bool set_to_clean_no_ic_refill(CompiledICorStaticCall* ic) {
+ guarantee(ic->set_to_clean(), "Should not need transition stubs");
+ return true;
+}
+
+bool opt_virtual_call_Relocation::clear_inline_cache() {
// No stubs for ICs
// Clean IC
ResourceMark rm;
CompiledIC* icache = CompiledIC_at(this);
- icache->set_to_clean();
+ return set_to_clean_no_ic_refill(icache);
}
-
address opt_virtual_call_Relocation::static_stub(bool is_aot) {
// search for the static stub who points back to this static call
address static_call_addr = addr();
@@ -715,10 +720,10 @@
_method_index = unpack_1_int();
}
-void static_call_Relocation::clear_inline_cache() {
+bool static_call_Relocation::clear_inline_cache() {
// Safe call site info
CompiledStaticCall* handler = this->code()->compiledStaticCall_at(this);
- handler->set_to_clean();
+ return set_to_clean_no_ic_refill(handler);
}
@@ -757,10 +762,11 @@
return NULL;
}
-void static_stub_Relocation::clear_inline_cache() {
+bool static_stub_Relocation::clear_inline_cache() {
// Call stub is only used when calling the interpreted code.
// It does not really need to be cleared, except that we want to clean out the methodoop.
CompiledDirectStaticCall::set_stub_to_clean(this);
+ return true;
}