< prev index next >
src/hotspot/share/runtime/thread.cpp
Print this page
rev 59077 : 8153224.v2.09b.patch combined with 8153224.v2.10.patch; merge with jdk-15+21.
rev 59078 : eosterlund v2.10 CR: reorganize deflate_monitor_using_JT() to use "early exit" style; dcubed - clarify/fix/rearrange a few comments in deflate_monitor_using_JT(); eosterlund v2.10 CR: simplify install_displaced_markword_in_object() and save_om_ptr(); save_om_ptr()'s call to install_displaced_markword_in_object() can race with the deflater thread's clearing of the object field so handle that; fold 8153224.OMHandle_experiment into 8153224.v2.11.patch; merge with jdk-15+21.
@@ -4681,10 +4681,12 @@
int i = 0;
DO_JAVA_THREADS(t_list, p) {
if (!p->can_call_java()) continue;
+ // The first stage of async deflation does not affect any field
+ // used by this comparison so the ObjectMonitor* is usable here.
address pending = (address)p->current_pending_monitor();
if (pending == monitor) { // found a match
if (i < count) result->append(p); // save the first count matches
i++;
}
< prev index next >