429 // need block to avoid SS compiler bug
430 {
431 return;
432 }
433 }
434 }
435
436 #if INCLUDE_JVMCI
437 // We are not using CATCH here because we want the exit to continue normally.
438 Thread* THREAD = thread;
439 JVMCIRuntime::shutdown(THREAD);
440 if (HAS_PENDING_EXCEPTION) {
441 HandleMark hm(THREAD);
442 Handle exception(THREAD, PENDING_EXCEPTION);
443 CLEAR_PENDING_EXCEPTION;
444 java_lang_Throwable::java_printStackTrace(exception, THREAD);
445 }
446 #endif
447
448 // Hang forever on exit if we're reporting an error.
449 if (ShowMessageBoxOnError && is_error_reported()) {
450 os::infinite_sleep();
451 }
452
453 EventThreadEnd event;
454 if (event.should_commit()) {
455 event.set_thread(THREAD_TRACE_ID(thread));
456 event.commit();
457 }
458
459 TRACE_VM_EXIT();
460
461 // Stop the WatcherThread. We do this before disenrolling various
462 // PeriodicTasks to reduce the likelihood of races.
463 if (PeriodicTask::num_tasks() > 0) {
464 WatcherThread::stop();
465 }
466
467 // Print statistics gathered (profiling ...)
468 if (Arguments::has_profile()) {
469 FlatProfiler::disengage();
|
429 // need block to avoid SS compiler bug
430 {
431 return;
432 }
433 }
434 }
435
436 #if INCLUDE_JVMCI
437 // We are not using CATCH here because we want the exit to continue normally.
438 Thread* THREAD = thread;
439 JVMCIRuntime::shutdown(THREAD);
440 if (HAS_PENDING_EXCEPTION) {
441 HandleMark hm(THREAD);
442 Handle exception(THREAD, PENDING_EXCEPTION);
443 CLEAR_PENDING_EXCEPTION;
444 java_lang_Throwable::java_printStackTrace(exception, THREAD);
445 }
446 #endif
447
448 // Hang forever on exit if we're reporting an error.
449 if (ShowMessageBoxOnError && VMError::is_error_reported()) {
450 os::infinite_sleep();
451 }
452
453 EventThreadEnd event;
454 if (event.should_commit()) {
455 event.set_thread(THREAD_TRACE_ID(thread));
456 event.commit();
457 }
458
459 TRACE_VM_EXIT();
460
461 // Stop the WatcherThread. We do this before disenrolling various
462 // PeriodicTasks to reduce the likelihood of races.
463 if (PeriodicTask::num_tasks() > 0) {
464 WatcherThread::stop();
465 }
466
467 // Print statistics gathered (profiling ...)
468 if (Arguments::has_profile()) {
469 FlatProfiler::disengage();
|