< prev index next >

src/hotspot/share/runtime/thread.cpp

Print this page
rev 57595 : v2.09a with 8235795, 8235931 and 8236035 extracted; rebased to jdk-14+28; merge with 8236035.patch.cr1; merge with 8235795.patch.cr1; merge with 8236035.patch.cr2; merge with 8235795.patch.cr2; merge with 8235795.patch.cr3.

@@ -4676,11 +4676,16 @@
 
   int i = 0;
   DO_JAVA_THREADS(t_list, p) {
     if (!p->can_call_java()) continue;
 
-    address pending = (address)p->current_pending_monitor();
+    // This current_pending_monitor() call site only uses the returned
+    // ObjectMonitor* for matching purposes and does not try to fetch
+    // the object reference so this ObjectMonitorHandle is not strictly
+    // necessary.
+    ObjectMonitorHandle omh;
+    address pending = (address)p->current_pending_monitor(&omh);
     if (pending == monitor) {             // found a match
       if (i < count) result->append(p);   // save the first count matches
       i++;
     }
   }
< prev index next >