--- old/src/hotspot/share/runtime/unhandledOops.cpp 2019-07-17 11:42:54.605311119 -0400 +++ new/src/hotspot/share/runtime/unhandledOops.cpp 2019-07-17 11:42:54.385311126 -0400 @@ -55,15 +55,15 @@ // 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; +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) { - for (int i=0; i<_level; i++) tty->print(" "); + _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); @@ -98,11 +98,11 @@ 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(" "); + 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");