< prev index next >

src/hotspot/share/runtime/monitorDeflationThread.cpp

Print this page

77   if (wait_time == max_intx) {
78     warning("Async deflation is disabled");
79     return;
80   }
81 
82   while (true) {
83     {
84       // Need state transition ThreadBlockInVM so that this thread
85       // will be handled by safepoint correctly when this thread is
86       // notified at a safepoint.
87 
88       ThreadBlockInVM tbivm(jt);
89 
90       MonitorLocker ml(MonitorDeflation_lock, Mutex::_no_safepoint_check_flag);
91       while (!ObjectSynchronizer::is_async_deflation_needed()) {
92         // Wait until notified that there is some work to do.
93         ml.wait(wait_time);
94       }
95     }
96 
97     (void)ObjectSynchronizer::deflate_idle_monitors(/* ObjectMonitorsHashtable is not needed here */ nullptr);
98   }
99 }

77   if (wait_time == max_intx) {
78     warning("Async deflation is disabled");
79     return;
80   }
81 
82   while (true) {
83     {
84       // Need state transition ThreadBlockInVM so that this thread
85       // will be handled by safepoint correctly when this thread is
86       // notified at a safepoint.
87 
88       ThreadBlockInVM tbivm(jt);
89 
90       MonitorLocker ml(MonitorDeflation_lock, Mutex::_no_safepoint_check_flag);
91       while (!ObjectSynchronizer::is_async_deflation_needed()) {
92         // Wait until notified that there is some work to do.
93         ml.wait(wait_time);
94       }
95     }
96 
97     (void)ObjectSynchronizer::deflate_idle_monitors();
98   }
99 }
< prev index next >