< prev index next >
src/share/vm/c1/c1_LIRAssembler.cpp
Print this page
@@ -119,11 +119,12 @@
, _masm(c->masm())
, _bs(Universe::heap()->barrier_set())
, _frame_map(c->frame_map())
, _current_block(NULL)
, _pending_non_safepoint(NULL)
- , _pending_non_safepoint_offset(0)
+ , _pending_non_safepoint_begin_offset(0)
+ , _pending_non_safepoint_end_offset(0)
{
_slow_case_stubs = new CodeStubList();
}
@@ -363,30 +364,34 @@
void LIR_Assembler::process_debug_info(LIR_Op* op) {
Instruction* src = op->source();
if (src == NULL) return;
int pc_offset = code_offset();
if (_pending_non_safepoint == src) {
- _pending_non_safepoint_offset = pc_offset;
+ _pending_non_safepoint_end_offset = pc_offset;
return;
}
ValueStack* vstack = debug_info(src);
if (vstack == NULL) return;
if (_pending_non_safepoint != NULL) {
// Got some old debug info. Get rid of it.
if (debug_info(_pending_non_safepoint) == vstack) {
- _pending_non_safepoint_offset = pc_offset;
+ _pending_non_safepoint_end_offset = pc_offset;
return;
}
- if (_pending_non_safepoint_offset < pc_offset) {
+ if (_pending_non_safepoint_end_offset < pc_offset) {
+ record_non_safepoint_debug_info();
+ } else if (_pending_non_safepoint_begin_offset < pc_offset) {
+ _pending_non_safepoint_end_offset = pc_offset - 1;
record_non_safepoint_debug_info();
}
_pending_non_safepoint = NULL;
}
// Remember the debug info.
if (pc_offset > compilation()->debug_info_recorder()->last_pc_offset()) {
_pending_non_safepoint = src;
- _pending_non_safepoint_offset = pc_offset;
+ _pending_non_safepoint_begin_offset = pc_offset;
+ _pending_non_safepoint_end_offset = pc_offset;
}
}
// Index caller states in s, where 0 is the oldest, 1 its callee, etc.
// Return NULL if n is too large.
@@ -406,11 +411,11 @@
s = s->caller_state();
}
}
void LIR_Assembler::record_non_safepoint_debug_info() {
- int pc_offset = _pending_non_safepoint_offset;
+ int pc_offset = _pending_non_safepoint_end_offset;
ValueStack* vstack = debug_info(_pending_non_safepoint);
int bci = vstack->bci();
DebugInformationRecorder* debug_info = compilation()->debug_info_recorder();
assert(debug_info->recording_non_safepoints(), "sanity");
@@ -447,10 +452,15 @@
void LIR_Assembler::add_debug_info_for_div0(int pc_offset, CodeEmitInfo* cinfo) {
DivByZeroStub* stub = new DivByZeroStub(pc_offset, cinfo);
append_code_stub(stub);
}
+void LIR_Assembler::add_non_safepoint_debug_info_here(CodeEmitInfo* info) {
+ flush_debug_info(code_offset());
+ info->record_non_safepoint_debug_info(compilation()->debug_info_recorder(), code_offset());
+}
+
void LIR_Assembler::emit_rtcall(LIR_OpRTCall* op) {
rt_call(op->result_opr(), op->addr(), op->arguments(), op->tmp(), op->info());
}
< prev index next >