equal
deleted
inserted
replaced
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()); |