< prev index next >

share/runtime/java.cpp

Print this page
rev 1 : G1GC+POGC+NVDIMM Patch with latest comments incorporated from all.


 575   // Warning: do not call 'exit_globals()' here. All threads are still running.
 576   // Calling 'exit_globals()' will disable thread-local-storage and cause all
 577   // kinds of assertions to trigger in debug mode.
 578   if (is_init_completed()) {
 579     Thread* thread = Thread::current_or_null();
 580     if (thread != NULL && thread->is_Java_thread()) {
 581       // We are leaving the VM, set state to native (in case any OS exit
 582       // handlers call back to the VM)
 583       JavaThread* jt = (JavaThread*)thread;
 584       // Must always be walkable or have no last_Java_frame when in
 585       // thread_in_native
 586       jt->frame_anchor()->make_walkable(jt);
 587       jt->set_thread_state(_thread_in_native);
 588     }
 589   }
 590   notify_vm_shutdown();
 591 }
 592 
 593 void vm_shutdown()
 594 {










 595   vm_perform_shutdown_actions();
 596   os::wait_for_keypress_at_exit();
 597   os::shutdown();
 598 }
 599 
 600 void vm_abort(bool dump_core) {
 601   vm_perform_shutdown_actions();
 602   os::wait_for_keypress_at_exit();
 603 
 604   // Flush stdout and stderr before abort.
 605   fflush(stdout);
 606   fflush(stderr);
 607 
 608   os::abort(dump_core);
 609   ShouldNotReachHere();
 610 }
 611 
 612 void vm_notify_during_shutdown(const char* error, const char* message) {
 613   if (error != NULL) {
 614     tty->print_cr("Error occurred during initialization of VM");




 575   // Warning: do not call 'exit_globals()' here. All threads are still running.
 576   // Calling 'exit_globals()' will disable thread-local-storage and cause all
 577   // kinds of assertions to trigger in debug mode.
 578   if (is_init_completed()) {
 579     Thread* thread = Thread::current_or_null();
 580     if (thread != NULL && thread->is_Java_thread()) {
 581       // We are leaving the VM, set state to native (in case any OS exit
 582       // handlers call back to the VM)
 583       JavaThread* jt = (JavaThread*)thread;
 584       // Must always be walkable or have no last_Java_frame when in
 585       // thread_in_native
 586       jt->frame_anchor()->make_walkable(jt);
 587       jt->set_thread_state(_thread_in_native);
 588     }
 589   }
 590   notify_vm_shutdown();
 591 }
 592 
 593 void vm_shutdown()
 594 {
 595   if (os::has_nvdimm() && UseParallelOldGC) {
 596     // all expand/shrinks for UseParallelOldGC need nvdimm_fd to
 597     // remain open so that more/less sized can be committed to nvdimm
 598 #if defined(_WINDOWS)
 599     // Do nothing as file is already closed as all the memory for OldGen was
 600     // mapped in one shot for NVDIMM.
 601 #else
 602     os::close(os::nvdimm_fd());
 603 #endif
 604   }
 605   vm_perform_shutdown_actions();
 606   os::wait_for_keypress_at_exit();
 607   os::shutdown();
 608 }
 609 
 610 void vm_abort(bool dump_core) {
 611   vm_perform_shutdown_actions();
 612   os::wait_for_keypress_at_exit();
 613 
 614   // Flush stdout and stderr before abort.
 615   fflush(stdout);
 616   fflush(stderr);
 617 
 618   os::abort(dump_core);
 619   ShouldNotReachHere();
 620 }
 621 
 622 void vm_notify_during_shutdown(const char* error, const char* message) {
 623   if (error != NULL) {
 624     tty->print_cr("Error occurred during initialization of VM");


< prev index next >