--- a/hotspot/src/cpu/sparc/vm/compiledIC_sparc.cpp Tue May 10 00:17:46 2016 -0700
+++ b/hotspot/src/cpu/sparc/vm/compiledIC_sparc.cpp Mon May 09 23:49:22 2016 -0700
@@ -101,10 +101,15 @@
NativeMovConstReg* method_holder = nativeMovConstReg_at(stub);
NativeJump* jump = nativeJump_at(method_holder->next_instruction_address());
- assert(method_holder->data() == 0 || method_holder->data() == (intptr_t)callee(),
+#ifdef ASSERT
+ // read the value once
+ intptr_t data = method_holder->data();
+ address destination = jump->jump_destination();
+ assert(data == 0 || data == (intptr_t)callee(),
"a) MT-unsafe modification of inline cache");
- assert(jump->jump_destination() == (address)-1 || jump->jump_destination() == entry,
+ assert(destination == (address)-1 || destination == entry,
"b) MT-unsafe modification of inline cache");
+#endif
// Update stub.
method_holder->set_data((intptr_t)callee());