< prev index next >

src/hotspot/share/runtime/serviceThread.cpp

Print this page
rev 56044 : imported patch 8230184.patch
rev 56046 : v2.00 -> v2.05 (CR5/v2.05/8-for-jdk13) patches combined into one; merge with 8229212.patch; merge with jdk-14+11; merge with 8230184.patch.
rev 56049 : Merge the remainder of the lock-free monitor list changes from v2.06 with v2.06a and v2.06b after running the changes through the edit scripts; merge pieces from dcubed.monitor_deflate_conc.v2.06d in dcubed.monitor_deflate_conc.v2.06[ac]; merge pieces from dcubed.monitor_deflate_conc.v2.06e into dcubed.monitor_deflate_conc.v2.06c; merge with jdk-14+11; test work around for test/jdk/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java should not been needed anymore.


 173     if(has_dcmd_notification_event) {
 174       DCmdFactory::send_notification(CHECK);
 175     }
 176 
 177     if (resolved_method_table_work) {
 178       ResolvedMethodTable::do_concurrent_work(jt);
 179     }
 180 
 181     if (protection_domain_table_work) {
 182       SystemDictionary::pd_cache_table()->unlink();
 183     }
 184 
 185     if (oopstorage_work) {
 186       cleanup_oopstorages(oopstorages, oopstorage_count);
 187     }
 188 
 189     if (deflate_idle_monitors) {
 190       // Deflate any global idle monitors.
 191       ObjectSynchronizer::deflate_global_idle_monitors_using_JT();
 192 
 193       // deflate_per_thread_idle_monitors_using_JT() is called by
 194       // each JavaThread from ObjectSynchronizer::omAlloc() as needed.
 195       int count = 0;
 196       for (JavaThreadIteratorWithHandle jtiwh; JavaThread *jt = jtiwh.next(); ) {
 197         if (jt->om_in_use_count > 0) {
 198           // This JavaThread is using monitors so request deflation.
 199           jt->om_request_deflation = true;


 200           count++;
 201         }
 202       }
 203       if (count > 0) {
 204         log_debug(monitorinflation)("requesting async deflation of idle monitors for %d thread(s).", count);
 205       }
 206       // The ServiceThread's async deflation request has been processed.
 207       ObjectSynchronizer::set_is_async_deflation_requested(false);
 208 
 209       // The global in-use list was handled above, but the request won't
 210       // be complete until the JavaThreads have handled their in-use
 211       // lists. This is the nature of an async deflation request.
 212     }
 213   }
 214 }
 215 
 216 bool ServiceThread::is_service_thread(Thread* thread) {
 217   return thread == _instance;
 218 }


 173     if(has_dcmd_notification_event) {
 174       DCmdFactory::send_notification(CHECK);
 175     }
 176 
 177     if (resolved_method_table_work) {
 178       ResolvedMethodTable::do_concurrent_work(jt);
 179     }
 180 
 181     if (protection_domain_table_work) {
 182       SystemDictionary::pd_cache_table()->unlink();
 183     }
 184 
 185     if (oopstorage_work) {
 186       cleanup_oopstorages(oopstorages, oopstorage_count);
 187     }
 188 
 189     if (deflate_idle_monitors) {
 190       // Deflate any global idle monitors.
 191       ObjectSynchronizer::deflate_global_idle_monitors_using_JT();
 192 


 193       int count = 0;
 194       for (JavaThreadIteratorWithHandle jtiwh; JavaThread *jt = jtiwh.next(); ) {
 195         if (jt->om_in_use_count > 0 && !jt->is_exiting()) {
 196           // This JavaThread is using ObjectMonitors so deflate any that
 197           // are idle unless this JavaThread is exiting; do not race with
 198           // ObjectSynchronizer::om_flush().
 199           ObjectSynchronizer::deflate_per_thread_idle_monitors_using_JT(jt);
 200           count++;
 201         }
 202       }
 203       if (count > 0) {
 204         log_debug(monitorinflation)("did async deflation of idle monitors for %d thread(s).", count);
 205       }
 206       // The ServiceThread's async deflation request has been processed.
 207       ObjectSynchronizer::set_is_async_deflation_requested(false);




 208     }
 209   }
 210 }
 211 
 212 bool ServiceThread::is_service_thread(Thread* thread) {
 213   return thread == _instance;
 214 }
< prev index next >