243 : VMThreadPriority;
244 // Note that I cannot call os::set_priority because it expects Java
245 // priorities and I am *explicitly* using OS priorities so that it's
246 // possible to set the VM thread priority higher than any Java thread.
247 os::set_native_priority( this, prio );
248
249 // Wait for VM_Operations until termination
250 this->loop();
251
252 // Note the intention to exit before safepointing.
253 // 6295565 This has the effect of waiting for any large tty
254 // outputs to finish.
255 if (xtty != NULL) {
256 ttyLocker ttyl;
257 xtty->begin_elem("destroy_vm");
258 xtty->stamp();
259 xtty->end_elem();
260 assert(should_terminate(), "termination flag must be set");
261 }
262
263 if (AsyncDeflateIdleMonitors && log_is_enabled(Info, monitorinflation)) {
264 // AsyncDeflateIdleMonitors does a special deflation in order
265 // to reduce the in-use monitor population that is reported by
266 // ObjectSynchronizer::log_in_use_monitor_details() at VM exit.
267 ObjectSynchronizer::request_deflate_idle_monitors();
268 }
269
270 // 4526887 let VM thread exit at Safepoint
271 _cur_vm_operation = &halt_op;
272 SafepointSynchronize::begin();
273
274 if (VerifyBeforeExit) {
275 HandleMark hm(VMThread::vm_thread());
276 // Among other things, this ensures that Eden top is correct.
277 Universe::heap()->prepare_for_verify();
278 // Silent verification so as not to pollute normal output,
279 // unless we really asked for it.
280 Universe::verify();
281 }
282
283 CompileBroker::set_should_block();
284
285 // wait for threads (compiler threads or daemon threads) in the
286 // _thread_in_native state to block.
|
243 : VMThreadPriority;
244 // Note that I cannot call os::set_priority because it expects Java
245 // priorities and I am *explicitly* using OS priorities so that it's
246 // possible to set the VM thread priority higher than any Java thread.
247 os::set_native_priority( this, prio );
248
249 // Wait for VM_Operations until termination
250 this->loop();
251
252 // Note the intention to exit before safepointing.
253 // 6295565 This has the effect of waiting for any large tty
254 // outputs to finish.
255 if (xtty != NULL) {
256 ttyLocker ttyl;
257 xtty->begin_elem("destroy_vm");
258 xtty->stamp();
259 xtty->end_elem();
260 assert(should_terminate(), "termination flag must be set");
261 }
262
263 if (log_is_enabled(Info, monitorinflation)) {
264 // Do a deflation in order to reduce the in-use monitor population
265 // that is reported by ObjectSynchronizer::log_in_use_monitor_details()
266 // at VM exit.
267 ObjectSynchronizer::request_deflate_idle_monitors();
268 }
269
270 // 4526887 let VM thread exit at Safepoint
271 _cur_vm_operation = &halt_op;
272 SafepointSynchronize::begin();
273
274 if (VerifyBeforeExit) {
275 HandleMark hm(VMThread::vm_thread());
276 // Among other things, this ensures that Eden top is correct.
277 Universe::heap()->prepare_for_verify();
278 // Silent verification so as not to pollute normal output,
279 // unless we really asked for it.
280 Universe::verify();
281 }
282
283 CompileBroker::set_should_block();
284
285 // wait for threads (compiler threads or daemon threads) in the
286 // _thread_in_native state to block.
|