src/hotspot/share/runtime/synchronizer.cpp
changeset 59251 4cbfa5077d68
parent 59247 56bf71d64d51
child 59252 623722a6aeb9
equal deleted inserted replaced
59250:a6deb69743d4 59251:4cbfa5077d68
   996   // Ultimately, this results in a call to deflate_idle_monitors() in the near future.
   996   // Ultimately, this results in a call to deflate_idle_monitors() in the near future.
   997   // More precisely, trigger an asynchronous STW safepoint as the number
   997   // More precisely, trigger an asynchronous STW safepoint as the number
   998   // of active monitors passes the specified threshold.
   998   // of active monitors passes the specified threshold.
   999   // TODO: assert thread state is reasonable
   999   // TODO: assert thread state is reasonable
  1000 
  1000 
  1001   if (ForceMonitorScavenge == 0 && Atomic::xchg (1, &ForceMonitorScavenge) == 0) {
  1001   if (ForceMonitorScavenge == 0 && Atomic::xchg(&ForceMonitorScavenge, 1) == 0) {
  1002     // Induce a 'null' safepoint to scavenge monitors
  1002     // Induce a 'null' safepoint to scavenge monitors
  1003     // Must VM_Operation instance be heap allocated as the op will be enqueue and posted
  1003     // Must VM_Operation instance be heap allocated as the op will be enqueue and posted
  1004     // to the VMthread and have a lifespan longer than that of this activation record.
  1004     // to the VMthread and have a lifespan longer than that of this activation record.
  1005     // The VMThread will delete the op when completed.
  1005     // The VMThread will delete the op when completed.
  1006     VMThread::execute(new VM_ScavengeMonitors());
  1006     VMThread::execute(new VM_ScavengeMonitors());