--- old/src/share/vm/c1/c1_LIRAssembler.hpp 2016-10-25 10:40:05.393775024 +0200 +++ new/src/share/vm/c1/c1_LIRAssembler.hpp 2016-10-25 10:40:05.346774993 +0200 @@ -45,7 +45,8 @@ BlockBegin* _current_block; Instruction* _pending_non_safepoint; - int _pending_non_safepoint_offset; + int _pending_non_safepoint_begin_offset; + int _pending_non_safepoint_end_offset; Label _unwind_handler_entry; @@ -62,8 +63,13 @@ // non-safepoint debug info management void flush_debug_info(int before_pc_offset) { if (_pending_non_safepoint != NULL) { - if (_pending_non_safepoint_offset < before_pc_offset) + if (_pending_non_safepoint_end_offset < before_pc_offset) { record_non_safepoint_debug_info(); + } else if (_pending_non_safepoint_begin_offset < before_pc_offset) { + // stretch as far as possible before the conflict + _pending_non_safepoint_end_offset = before_pc_offset - 1; + record_non_safepoint_debug_info(); + } _pending_non_safepoint = NULL; } } @@ -146,6 +152,7 @@ void emit_static_call_stub(); void append_code_stub(CodeStub* op); void add_call_info_here(CodeEmitInfo* info) { add_call_info(code_offset(), info); } + void add_non_safepoint_debug_info_here(CodeEmitInfo* info); // code patterns int emit_exception_handler();