--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Fri Jun 24 15:09:00 2016 -0700
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Fri Jun 24 15:30:50 2016 -0700
@@ -3434,7 +3434,7 @@
__ load(counter, result);
__ add(result, LIR_OprFact::intConst(InvocationCounter::count_increment), result);
__ store(result, counter);
- if (notify) {
+ if (notify && (!backedge || UseOnStackReplacement)) {
LIR_Opr meth = LIR_OprFact::metadataConst(method->constant_encoding());
// The bci for info can point to cmp for if's we want the if bci
CodeStub* overflow = new CounterOverflowStub(info, bci, meth);