--- a/hotspot/src/share/vm/runtime/thread.cpp Wed May 17 23:18:19 2017 +0200
+++ b/hotspot/src/share/vm/runtime/thread.cpp Wed May 17 23:36:19 2017 +0200
@@ -792,6 +792,12 @@
// Do oop for ThreadShadow
f->do_oop((oop*)&_pending_exception);
handle_area()->oops_do(f);
+
+ if (MonitorInUseLists) {
+ // When using thread local monitor lists, we scan them here,
+ // and the remaining global monitors in ObjectSynchronizer::oops_do().
+ ObjectSynchronizer::thread_local_used_oops_do(this, f);
+ }
}
void Thread::metadata_handles_do(void f(Metadata*)) {