--- old/src/share/vm/utilities/vmError.cpp 2019-02-15 19:02:51.026358427 +0300 +++ new/src/share/vm/utilities/vmError.cpp 2019-02-15 19:02:50.906362615 +0300 @@ -26,6 +26,7 @@ #include "precompiled.hpp" #include "compiler/compileBroker.hpp" #include "gc_interface/collectedHeap.hpp" +#include "jfr/jfrEvents.hpp" #include "prims/whitebox.hpp" #include "runtime/arguments.hpp" #include "runtime/frame.inline.hpp" @@ -42,6 +43,10 @@ #include "utilities/events.hpp" #include "utilities/top.hpp" #include "utilities/vmError.hpp" +#include "utilities/macros.hpp" +#if INCLUDE_JFR +#include "jfr/jfr.hpp" +#endif PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC @@ -939,6 +944,13 @@ // are handled properly. reset_signal_handlers(); + EventShutdown e; + 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