294 : VMThreadPriority;
295 // Note that I cannot call os::set_priority because it expects Java
296 // priorities and I am *explicitly* using OS priorities so that it's
297 // possible to set the VM thread priority higher than any Java thread.
298 os::set_native_priority( this, prio );
299
300 // Wait for VM_Operations until termination
301 this->loop();
302
303 // Note the intention to exit before safepointing.
304 // 6295565 This has the effect of waiting for any large tty
305 // outputs to finish.
306 if (xtty != NULL) {
307 ttyLocker ttyl;
308 xtty->begin_elem("destroy_vm");
309 xtty->stamp();
310 xtty->end_elem();
311 assert(should_terminate(), "termination flag must be set");
312 }
313
314 if (AsyncDeflateIdleMonitors) {
315 // AsyncDeflateIdleMonitors does a special deflation at the final
316 // safepoint in order to reduce the in-use monitor population that
317 // is reported ObjectSynchronizer::log_in_use_monitor_details() at
318 // VM exit.
319 ObjectSynchronizer::set_is_special_deflation_requested(true);
320 }
321
322 // 4526887 let VM thread exit at Safepoint
323 _cur_vm_operation = &halt_op;
324 SafepointSynchronize::begin();
325
326 if (VerifyBeforeExit) {
327 HandleMark hm(VMThread::vm_thread());
328 // Among other things, this ensures that Eden top is correct.
329 Universe::heap()->prepare_for_verify();
330 // Silent verification so as not to pollute normal output,
331 // unless we really asked for it.
332 Universe::verify();
333 }
334
335 CompileBroker::set_should_block();
336
337 // wait for threads (compiler threads or daemon threads) in the
338 // _thread_in_native state to block.
|
294 : VMThreadPriority;
295 // Note that I cannot call os::set_priority because it expects Java
296 // priorities and I am *explicitly* using OS priorities so that it's
297 // possible to set the VM thread priority higher than any Java thread.
298 os::set_native_priority( this, prio );
299
300 // Wait for VM_Operations until termination
301 this->loop();
302
303 // Note the intention to exit before safepointing.
304 // 6295565 This has the effect of waiting for any large tty
305 // outputs to finish.
306 if (xtty != NULL) {
307 ttyLocker ttyl;
308 xtty->begin_elem("destroy_vm");
309 xtty->stamp();
310 xtty->end_elem();
311 assert(should_terminate(), "termination flag must be set");
312 }
313
314 if (AsyncDeflateIdleMonitors && log_is_enabled(Info, monitorinflation)) {
315 // AsyncDeflateIdleMonitors does a special deflation at the final
316 // safepoint in order to reduce the in-use monitor population that
317 // is reported by ObjectSynchronizer::log_in_use_monitor_details()
318 // at VM exit.
319 ObjectSynchronizer::set_is_special_deflation_requested(true);
320 }
321
322 // 4526887 let VM thread exit at Safepoint
323 _cur_vm_operation = &halt_op;
324 SafepointSynchronize::begin();
325
326 if (VerifyBeforeExit) {
327 HandleMark hm(VMThread::vm_thread());
328 // Among other things, this ensures that Eden top is correct.
329 Universe::heap()->prepare_for_verify();
330 // Silent verification so as not to pollute normal output,
331 // unless we really asked for it.
332 Universe::verify();
333 }
334
335 CompileBroker::set_should_block();
336
337 // wait for threads (compiler threads or daemon threads) in the
338 // _thread_in_native state to block.
|