< prev index next >

src/share/vm/runtime/thread.cpp

Print this page
rev 13002 : 8180175: ObjectSynchronizer only needs to iterate in-use monitors

@@ -790,10 +790,16 @@
 void Thread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
   active_handles()->oops_do(f);
   // 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 remaing global monitors in ObjectSynchronizer::oops_do().
+    ObjectSynchronizer::thread_local_used_oops_do(this, f);
+  }
 }
 
 void Thread::metadata_handles_do(void f(Metadata*)) {
   // Only walk the Handles in Thread.
   if (metadata_handles() != NULL) {
< prev index next >