equal
deleted
inserted
replaced
4210 // + Stop VM thread, it will bring the remaining VM to a safepoint and stop |
4210 // + Stop VM thread, it will bring the remaining VM to a safepoint and stop |
4211 // the compiler threads at safepoint |
4211 // the compiler threads at safepoint |
4212 // <-- do not use anything that could get blocked by Safepoint --> |
4212 // <-- do not use anything that could get blocked by Safepoint --> |
4213 // + Disable tracing at JNI/JVM barriers |
4213 // + Disable tracing at JNI/JVM barriers |
4214 // + Set _vm_exited flag for threads that are still running native code |
4214 // + Set _vm_exited flag for threads that are still running native code |
4215 // + Delete this thread |
|
4216 // + Call exit_globals() |
4215 // + Call exit_globals() |
4217 // > deletes tty |
4216 // > deletes tty |
4218 // > deletes PerfMemory resources |
4217 // > deletes PerfMemory resources |
|
4218 // + Delete this thread |
4219 // + Return to caller |
4219 // + Return to caller |
4220 |
4220 |
4221 bool Threads::destroy_vm() { |
4221 bool Threads::destroy_vm() { |
4222 JavaThread* thread = JavaThread::current(); |
4222 JavaThread* thread = JavaThread::current(); |
4223 |
4223 |
4289 IdealGraphPrinter::clean_up(); |
4289 IdealGraphPrinter::clean_up(); |
4290 #endif |
4290 #endif |
4291 |
4291 |
4292 notify_vm_shutdown(); |
4292 notify_vm_shutdown(); |
4293 |
4293 |
|
4294 // exit_globals() will delete tty |
|
4295 exit_globals(); |
|
4296 |
4294 // We are after VM_Exit::set_vm_exited() so we can't call |
4297 // We are after VM_Exit::set_vm_exited() so we can't call |
4295 // thread->smr_delete() or we will block on the Threads_lock. |
4298 // thread->smr_delete() or we will block on the Threads_lock. |
4296 // Deleting the shutdown thread here is safe because another |
4299 // Deleting the shutdown thread here is safe because another |
4297 // JavaThread cannot have an active ThreadsListHandle for |
4300 // JavaThread cannot have an active ThreadsListHandle for |
4298 // this JavaThread. |
4301 // this JavaThread. |
4301 #if INCLUDE_JVMCI |
4304 #if INCLUDE_JVMCI |
4302 if (JVMCICounterSize > 0) { |
4305 if (JVMCICounterSize > 0) { |
4303 FREE_C_HEAP_ARRAY(jlong, JavaThread::_jvmci_old_thread_counters); |
4306 FREE_C_HEAP_ARRAY(jlong, JavaThread::_jvmci_old_thread_counters); |
4304 } |
4307 } |
4305 #endif |
4308 #endif |
4306 |
|
4307 // exit_globals() will delete tty |
|
4308 exit_globals(); |
|
4309 |
4309 |
4310 LogConfiguration::finalize(); |
4310 LogConfiguration::finalize(); |
4311 |
4311 |
4312 return true; |
4312 return true; |
4313 } |
4313 } |