equal
deleted
inserted
replaced
27 #include "runtime/javaCalls.hpp" |
27 #include "runtime/javaCalls.hpp" |
28 #include "runtime/serviceThread.hpp" |
28 #include "runtime/serviceThread.hpp" |
29 #include "runtime/mutexLocker.hpp" |
29 #include "runtime/mutexLocker.hpp" |
30 #include "runtime/os.hpp" |
30 #include "runtime/os.hpp" |
31 #include "prims/jvmtiImpl.hpp" |
31 #include "prims/jvmtiImpl.hpp" |
32 #include "services/allocationContextService.hpp" |
|
33 #include "services/diagnosticArgument.hpp" |
32 #include "services/diagnosticArgument.hpp" |
34 #include "services/diagnosticFramework.hpp" |
33 #include "services/diagnosticFramework.hpp" |
35 #include "services/gcNotifier.hpp" |
34 #include "services/gcNotifier.hpp" |
36 #include "services/lowMemoryDetector.hpp" |
35 #include "services/lowMemoryDetector.hpp" |
37 |
36 |
103 |
102 |
104 MutexLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag); |
103 MutexLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag); |
105 while (!(sensors_changed = LowMemoryDetector::has_pending_requests()) && |
104 while (!(sensors_changed = LowMemoryDetector::has_pending_requests()) && |
106 !(has_jvmti_events = JvmtiDeferredEventQueue::has_events()) && |
105 !(has_jvmti_events = JvmtiDeferredEventQueue::has_events()) && |
107 !(has_gc_notification_event = GCNotifier::has_event()) && |
106 !(has_gc_notification_event = GCNotifier::has_event()) && |
108 !(has_dcmd_notification_event = DCmdFactory::has_pending_jmx_notification()) && |
107 !(has_dcmd_notification_event = DCmdFactory::has_pending_jmx_notification())) { |
109 !(acs_notify = AllocationContextService::should_notify())) { |
|
110 // wait until one of the sensors has pending requests, or there is a |
108 // wait until one of the sensors has pending requests, or there is a |
111 // pending JVMTI event or JMX GC notification to post |
109 // pending JVMTI event or JMX GC notification to post |
112 Service_lock->wait(Mutex::_no_safepoint_check_flag); |
110 Service_lock->wait(Mutex::_no_safepoint_check_flag); |
113 } |
111 } |
114 |
112 |
130 } |
128 } |
131 |
129 |
132 if(has_dcmd_notification_event) { |
130 if(has_dcmd_notification_event) { |
133 DCmdFactory::send_notification(CHECK); |
131 DCmdFactory::send_notification(CHECK); |
134 } |
132 } |
135 |
|
136 if (acs_notify) { |
|
137 AllocationContextService::notify(CHECK); |
|
138 } |
|
139 } |
133 } |
140 } |
134 } |
141 |
135 |
142 bool ServiceThread::is_service_thread(Thread* thread) { |
136 bool ServiceThread::is_service_thread(Thread* thread) { |
143 return thread == _instance; |
137 return thread == _instance; |