< prev index next >
src/hotspot/share/utilities/vmError.cpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -146,10 +146,38 @@
}
}
out->print_raw_cr("#");
}
+#if INCLUDE_JFR
+static void print_jfr_path(outputStream *out) {
+ if (out == NULL) {
+ return;
+ }
+
+ const char* dump_path = Jfr::saved_emergency_dump_path();
+ const char* repository_path = Jfr::repository_path();
+ if ((*dump_path == '\0') &&
+ ((repository_path == NULL) || (*repository_path == '\0'))) {
+ return;
+ }
+
+ out->print_raw_cr("# JFR recording file will be written. Location:");
+
+ if (*dump_path != '\0') {
+ out->print_raw("# - ");
+ out->print_raw_cr(dump_path);
+ }
+ if ((repository_path != NULL) && (*repository_path != '\0')) {
+ out->print_raw("# - ");
+ out->print_raw_cr(repository_path);
+ }
+
+ out->print_raw_cr("#");
+}
+#endif
+
bool VMError::coredump_status;
char VMError::coredump_message[O_BUFLEN];
void VMError::record_coredump_status(const char* message, bool status) {
coredump_status = status;
@@ -616,10 +644,17 @@
st->print("CreateCoredumpOnCrash turned off, no core file dumped");
}
st->cr();
st->print_cr("#");
+#if INCLUDE_JFR
+ STEP("printing jfr repository")
+ if (_verbose) {
+ print_jfr_path(st);
+ }
+#endif
+
STEP("printing bug submit message")
if (should_report_bug(_id) && _verbose) {
print_bug_submit_message(st, _thread);
}
@@ -1402,10 +1437,11 @@
// WatcherThread can kill JVM if the error handler hangs.
ShowMessageBoxOnError = false;
}
os::check_dump_limit(buffer, sizeof(buffer));
+ JFR_ONLY(Jfr::setup_emergency_dump_file_descriptor();)
// reset signal handlers or exception filter; make sure recursive crashes
// are handled properly.
reset_signal_handlers();
@@ -1413,12 +1449,10 @@
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;
@@ -1536,10 +1570,12 @@
}
log.set_fd(-1);
}
+ JFR_ONLY(Jfr::on_vm_shutdown(true);)
+
if (PrintNMTStatistics) {
fdStream fds(fd_out);
MemTracker::final_report(&fds);
}
< prev index next >