--- old/src/hotspot/cpu/x86/templateTable_x86.cpp 2018-07-02 23:50:45.031147592 +0000 +++ new/src/hotspot/cpu/x86/templateTable_x86.cpp 2018-07-02 23:50:44.891154706 +0000 @@ -2226,8 +2226,8 @@ const Address mdo_backedge_counter(rbx, in_bytes(MethodData::backedge_counter_offset()) + in_bytes(InvocationCounter::counter_offset())); const Address mask(rbx, in_bytes(MethodData::backedge_mask_offset())); - __ increment_mask_and_jump(mdo_backedge_counter, increment, mask, - rax, false, Assembler::zero, &backedge_counter_overflow); + __ increment_mask_and_jump(mdo_backedge_counter, increment, mask, rax, false, Assembler::zero, + UseOnStackReplacement ? &backedge_counter_overflow : &dispatch); __ jmp(dispatch); } __ bind(no_mdo); @@ -2235,7 +2235,8 @@ __ movptr(rcx, Address(rcx, Method::method_counters_offset())); const Address mask(rcx, in_bytes(MethodCounters::backedge_mask_offset())); __ increment_mask_and_jump(Address(rcx, be_offset), increment, mask, - rax, false, Assembler::zero, &backedge_counter_overflow); + rax, false, Assembler::zero, + UseOnStackReplacement ? &backedge_counter_overflow : &dispatch); } else { // not TieredCompilation // increment counter __ movptr(rcx, Address(rcx, Method::method_counters_offset())); --- old/src/hotspot/share/asm/assembler.hpp 2018-07-02 23:50:47.061044531 +0000 +++ new/src/hotspot/share/asm/assembler.hpp 2018-07-02 23:50:46.911052150 +0000 @@ -159,6 +159,10 @@ Label() { init(); } + + ~Label() { + assert(is_bound() || is_unused(), "Label was never bound to a location, but it was used as a jmp target"); + } }; // A NearLabel must be bound to a location near its users. Users can