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 }
|