< prev index next >
src/hotspot/share/runtime/serviceThread.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.
*** 104,113 ****
--- 104,114 ----
bool symboltable_work = false;
bool resolved_method_table_work = false;
bool thread_id_table_work = false;
bool protection_domain_table_work = false;
bool oopstorage_work = false;
+ bool deflate_idle_monitors = false;
JvmtiDeferredEvent jvmti_event;
{
// Need state transition ThreadBlockInVM so that this thread
// will be handled by safepoint correctly when this thread is
// notified at a safepoint.
*** 130,143 ****
(stringtable_work = StringTable::has_work()) |
(symboltable_work = SymbolTable::has_work()) |
(resolved_method_table_work = ResolvedMethodTable::has_work()) |
(thread_id_table_work = ThreadIdTable::has_work()) |
(protection_domain_table_work = SystemDictionary::pd_cache_table()->has_work()) |
! (oopstorage_work = OopStorage::has_cleanup_work_and_reset())
) == 0) {
// Wait until notified that there is some work to do.
! ml.wait();
}
if (has_jvmti_events) {
// Get the event under the Service_lock
jvmti_event = JvmtiDeferredEventQueue::dequeue();
--- 131,148 ----
(stringtable_work = StringTable::has_work()) |
(symboltable_work = SymbolTable::has_work()) |
(resolved_method_table_work = ResolvedMethodTable::has_work()) |
(thread_id_table_work = ThreadIdTable::has_work()) |
(protection_domain_table_work = SystemDictionary::pd_cache_table()->has_work()) |
! (oopstorage_work = OopStorage::has_cleanup_work_and_reset()) |
! (deflate_idle_monitors = ObjectSynchronizer::is_async_deflation_needed())
) == 0) {
// Wait until notified that there is some work to do.
! // If AsyncDeflateIdleMonitors, then we wait for
! // GuaranteedSafepointInterval so that is_async_deflation_needed()
! // is checked at the same interval.
! ml.wait(AsyncDeflateIdleMonitors ? GuaranteedSafepointInterval : 0);
}
if (has_jvmti_events) {
// Get the event under the Service_lock
jvmti_event = JvmtiDeferredEventQueue::dequeue();
*** 185,194 ****
--- 190,203 ----
}
if (oopstorage_work) {
cleanup_oopstorages();
}
+
+ if (deflate_idle_monitors) {
+ ObjectSynchronizer::deflate_idle_monitors_using_JT();
+ }
}
}
void ServiceThread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
JavaThread::oops_do(f, cf);
< prev index next >