< prev index next >

src/hotspot/share/runtime/thread.cpp

Print this page
rev 57232 : v2.00 -> v2.08 (CR8/v2.08/11-for-jdk14) patches combined into one; merge with jdk-14+25 snapshot; merge with jdk-14+26 snapshot.
rev 57233 : See CR8-to-CR9-changes; merge with 8230876.patch (2019.11.15); merge with jdk-14+25 snapshot; fuzzy merge with jdk-14+26 snapshot.

@@ -4667,11 +4667,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 >