--- a/hotspot/src/share/vm/code/compiledIC.cpp Fri Sep 26 20:09:02 2014 -0700
+++ b/hotspot/src/share/vm/code/compiledIC.cpp Mon Sep 29 08:40:51 2014 +0200
@@ -155,6 +155,14 @@
return _ic_call->destination();
}
+// Clears the IC stub if the compiled IC is in transition state
+void CompiledIC::clear_ic_stub() {
+ if (is_in_transition_state()) {
+ ICStub* stub = ICStub_from_destination_address(stub_address());
+ stub->clear();
+ }
+}
+
//-----------------------------------------------------------------------------
// High-level access to an inline cache. Guaranteed to be MT-safe.
@@ -333,10 +341,7 @@
if (safe_transition) {
// Kill any leftover stub we might have too
- if (is_in_transition_state()) {
- ICStub* old_stub = ICStub_from_destination_address(stub_address());
- old_stub->clear();
- }
+ clear_ic_stub();
if (is_optimized()) {
set_ic_destination(entry);
} else {