src/hotspot/share/runtime/serviceThread.cpp
changeset 58503 726a3945e934
parent 57906 e17f768b3b71
child 58504 94dd00d2da29
equal deleted inserted replaced
58502:7cb1218ef4d0 58503:726a3945e934
   118       MonitorLocker ml(Service_lock, Mutex::_no_safepoint_check_flag);
   118       MonitorLocker ml(Service_lock, Mutex::_no_safepoint_check_flag);
   119       // Process all available work on each (outer) iteration, rather than
   119       // Process all available work on each (outer) iteration, rather than
   120       // only the first recognized bit of work, to avoid frequently true early
   120       // only the first recognized bit of work, to avoid frequently true early
   121       // tests from potentially starving later work.  Hence the use of
   121       // tests from potentially starving later work.  Hence the use of
   122       // arithmetic-or to combine results; we don't want short-circuiting.
   122       // arithmetic-or to combine results; we don't want short-circuiting.
   123       while (((sensors_changed = LowMemoryDetector::has_pending_requests()) |
   123       while (((sensors_changed = (!UseNotificationThread && LowMemoryDetector::has_pending_requests())) |
   124               (has_jvmti_events = JvmtiDeferredEventQueue::has_events()) |
   124               (has_jvmti_events = JvmtiDeferredEventQueue::has_events()) |
   125               (has_gc_notification_event = GCNotifier::has_event()) |
   125               (has_gc_notification_event = (!UseNotificationThread && GCNotifier::has_event())) |
   126               (has_dcmd_notification_event = DCmdFactory::has_pending_jmx_notification()) |
   126               (has_dcmd_notification_event = (!UseNotificationThread && DCmdFactory::has_pending_jmx_notification())) |
   127               (stringtable_work = StringTable::has_work()) |
   127               (stringtable_work = StringTable::has_work()) |
   128               (symboltable_work = SymbolTable::has_work()) |
   128               (symboltable_work = SymbolTable::has_work()) |
   129               (resolved_method_table_work = ResolvedMethodTable::has_work()) |
   129               (resolved_method_table_work = ResolvedMethodTable::has_work()) |
   130               (protection_domain_table_work = SystemDictionary::pd_cache_table()->has_work()) |
   130               (protection_domain_table_work = SystemDictionary::pd_cache_table()->has_work()) |
   131               (oopstorage_work = OopStorage::has_cleanup_work_and_reset())
   131               (oopstorage_work = OopStorage::has_cleanup_work_and_reset())
   149 
   149 
   150     if (has_jvmti_events) {
   150     if (has_jvmti_events) {
   151       jvmti_event.post();
   151       jvmti_event.post();
   152     }
   152     }
   153 
   153 
   154     if (sensors_changed) {
   154     if (!UseNotificationThread) {
   155       LowMemoryDetector::process_sensor_changes(jt);
   155       if (sensors_changed) {
   156     }
   156         LowMemoryDetector::process_sensor_changes(jt);
       
   157       }
   157 
   158 
   158     if(has_gc_notification_event) {
   159       if(has_gc_notification_event) {
   159       GCNotifier::sendNotification(CHECK);
   160         GCNotifier::sendNotification(CHECK);
   160     }
   161       }
   161 
   162 
   162     if(has_dcmd_notification_event) {
   163       if(has_dcmd_notification_event) {
   163       DCmdFactory::send_notification(CHECK);
   164         DCmdFactory::send_notification(CHECK);
       
   165       }
   164     }
   166     }
   165 
   167 
   166     if (resolved_method_table_work) {
   168     if (resolved_method_table_work) {
   167       ResolvedMethodTable::do_concurrent_work(jt);
   169       ResolvedMethodTable::do_concurrent_work(jt);
   168     }
   170     }