< prev index next >

src/hotspot/share/utilities/vmError.cpp

Print this page

        

*** 1413,1424 **** if (e.should_commit()) { e.set_reason("VM Error"); e.commit(); } ! JFR_ONLY(Jfr::on_vm_shutdown(true);) ! } else { // If UseOsErrorReporting we call this for each level of the call stack // while searching for the exception handler. Only the first level needs // to be reported. if (UseOSErrorReporting && log_done) return; --- 1413,1435 ---- if (e.should_commit()) { e.set_reason("VM Error"); e.commit(); } ! #ifdef INCLUDE_JFR ! // JFR emergency dump would transit thread state to "_thread_in_vm". ! // We need to recover it after dumping. ! JavaThreadState orig_thread_state = _thread_max_state; ! if (thread && thread->is_Java_thread()) { ! JavaThread* jt = (JavaThread*)thread; ! orig_thread_state = jt->thread_state(); ! } ! Jfr::on_vm_shutdown(true); ! if (orig_thread_state != _thread_max_state) { ! ((JavaThread*)thread)->set_thread_state(orig_thread_state); ! } ! #endif } else { // If UseOsErrorReporting we call this for each level of the call stack // while searching for the exception handler. Only the first level needs // to be reported. if (UseOSErrorReporting && log_done) return;
< prev index next >