268 // Note that I cannot call os::set_priority because it expects Java
269 // priorities and I am *explicitly* using OS priorities so that it's
270 // possible to set the VM thread priority higher than any Java thread.
271 os::set_native_priority( this, prio );
272
273 // Wait for VM_Operations until termination
274 this->loop();
275
276 // Note the intention to exit before safepointing.
277 // 6295565 This has the effect of waiting for any large tty
278 // outputs to finish.
279 if (xtty != NULL) {
280 ttyLocker ttyl;
281 xtty->begin_elem("destroy_vm");
282 xtty->stamp();
283 xtty->end_elem();
284 assert(should_terminate(), "termination flag must be set");
285 }
286
287 if (AsyncDeflateIdleMonitors && log_is_enabled(Info, monitorinflation)) {
288 // AsyncDeflateIdleMonitors does a special deflation at the final
289 // safepoint in order to reduce the in-use monitor population that
290 // is reported by ObjectSynchronizer::log_in_use_monitor_details()
291 // at VM exit.
292 ObjectSynchronizer::set_is_special_deflation_requested(true);
293 }
294
295 // 4526887 let VM thread exit at Safepoint
296 _cur_vm_operation = &halt_op;
297 SafepointSynchronize::begin();
298
299 if (VerifyBeforeExit) {
300 HandleMark hm(VMThread::vm_thread());
301 // Among other things, this ensures that Eden top is correct.
302 Universe::heap()->prepare_for_verify();
303 // Silent verification so as not to pollute normal output,
304 // unless we really asked for it.
305 Universe::verify();
306 }
307
308 CompileBroker::set_should_block();
309
310 // wait for threads (compiler threads or daemon threads) in the
311 // _thread_in_native state to block.
312 VM_Exit::wait_for_threads_in_native_to_block();
|
268 // Note that I cannot call os::set_priority because it expects Java
269 // priorities and I am *explicitly* using OS priorities so that it's
270 // possible to set the VM thread priority higher than any Java thread.
271 os::set_native_priority( this, prio );
272
273 // Wait for VM_Operations until termination
274 this->loop();
275
276 // Note the intention to exit before safepointing.
277 // 6295565 This has the effect of waiting for any large tty
278 // outputs to finish.
279 if (xtty != NULL) {
280 ttyLocker ttyl;
281 xtty->begin_elem("destroy_vm");
282 xtty->stamp();
283 xtty->end_elem();
284 assert(should_terminate(), "termination flag must be set");
285 }
286
287 if (AsyncDeflateIdleMonitors && log_is_enabled(Info, monitorinflation)) {
288 // AsyncDeflateIdleMonitors does a special deflation in order
289 // to reduce the in-use monitor population that is reported by
290 // ObjectSynchronizer::log_in_use_monitor_details() at VM exit.
291 ObjectSynchronizer::request_deflate_idle_monitors();
292 }
293
294 // 4526887 let VM thread exit at Safepoint
295 _cur_vm_operation = &halt_op;
296 SafepointSynchronize::begin();
297
298 if (VerifyBeforeExit) {
299 HandleMark hm(VMThread::vm_thread());
300 // Among other things, this ensures that Eden top is correct.
301 Universe::heap()->prepare_for_verify();
302 // Silent verification so as not to pollute normal output,
303 // unless we really asked for it.
304 Universe::verify();
305 }
306
307 CompileBroker::set_should_block();
308
309 // wait for threads (compiler threads or daemon threads) in the
310 // _thread_in_native state to block.
311 VM_Exit::wait_for_threads_in_native_to_block();
|