< prev index next >
src/hotspot/share/runtime/unhandledOops.cpp
Print this page
*** 53,71 ****
tty->cr();
}
// For debugging unhandled oop detector _in the debugger_
// You don't want to turn it on in compiled code here.
! static bool unhandled_oop_print=0;
void UnhandledOops::register_unhandled_oop(oop* op, address pc) {
if (!_thread->is_in_stack((address)op))
return;
! _level ++;
! if (unhandled_oop_print) {
! for (int i=0; i<_level; i++) tty->print(" ");
tty->print_cr("r " INTPTR_FORMAT, p2i(op));
}
UnhandledOopEntry entry(op, pc);
_oop_list->push(entry);
}
--- 53,71 ----
tty->cr();
}
// For debugging unhandled oop detector _in the debugger_
// You don't want to turn it on in compiled code here.
! static Thread* unhandled_oop_print = NULL;
void UnhandledOops::register_unhandled_oop(oop* op, address pc) {
if (!_thread->is_in_stack((address)op))
return;
! _level++;
! if (unhandled_oop_print == _thread) {
! for (int i=0; i < _level; i++) tty->print(" ");
tty->print_cr("r " INTPTR_FORMAT, p2i(op));
}
UnhandledOopEntry entry(op, pc);
_oop_list->push(entry);
}
*** 96,110 ****
// oop list. All oops given are assumed to be on the list. If not,
// there's a bug in the unhandled oop detector.
void UnhandledOops::unregister_unhandled_oop(oop* op) {
if (!_thread->is_in_stack((address)op)) return;
! _level --;
! if (unhandled_oop_print) {
! for (int i=0; i<_level; i++) tty->print(" ");
tty->print_cr("u " INTPTR_FORMAT, p2i(op));
}
int i = _oop_list->find_from_end(op, match_oop_entry);
assert(i!=-1, "oop not in unhandled_oop_list");
_oop_list->remove_at(i);
}
--- 96,110 ----
// oop list. All oops given are assumed to be on the list. If not,
// there's a bug in the unhandled oop detector.
void UnhandledOops::unregister_unhandled_oop(oop* op) {
if (!_thread->is_in_stack((address)op)) return;
! if (unhandled_oop_print == _thread) {
! for (int i=0; i < _level; i++) tty->print(" ");
tty->print_cr("u " INTPTR_FORMAT, p2i(op));
}
+ _level--;
int i = _oop_list->find_from_end(op, match_oop_entry);
assert(i!=-1, "oop not in unhandled_oop_list");
_oop_list->remove_at(i);
}
< prev index next >