--- old/src/hotspot/share/utilities/vmError.cpp 2019-11-29 23:29:16.183557300 +0900 +++ new/src/hotspot/share/utilities/vmError.cpp 2019-11-29 23:29:15.509719100 +0900 @@ -148,6 +148,32 @@ out->print_raw_cr("#"); } +#if INCLUDE_JFR +static void print_jfr_path(outputStream *out) { + if (out == NULL) { + return; + } + + const char *path = NULL; + + path = Jfr::get_emergency_dump_path(); + if (*path != '\0') { + out->print_raw_cr("# JFR data is saved as:"); + out->print_raw ("# "); + out->print_raw_cr(path); + out->print_raw_cr("#"); + } else { + path = Jfr::get_repository_path(); + if ((path != NULL) && (*path != '\0')) { + out->print_raw_cr("# JFR files might be saved in the repository:"); + out->print_raw ("# "); + out->print_raw_cr(path); + out->print_raw_cr("#"); + } + } +} +#endif + bool VMError::coredump_status; char VMError::coredump_message[O_BUFLEN]; @@ -618,6 +644,14 @@ 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) { @@ -1536,6 +1570,7 @@ } log.set_fd(-1); + out.print_raw_cr("#"); } if (PrintNMTStatistics) { @@ -1562,15 +1597,23 @@ out.print_raw("#\n# Can't open file to dump replay data. Error: "); out.print_raw_cr(os::strerror(e)); } + out.print_raw_cr("#"); } } } +#if INCLUDE_JFR + static bool skip_jfr_repository = false; + if (!skip_jfr_repository) { + skip_jfr_repository = true; + print_jfr_path(&out); + out.print_raw_cr("#"); + } +#endif + static bool skip_bug_url = !should_report_bug(_id); if (!skip_bug_url) { skip_bug_url = true; - - out.print_raw_cr("#"); print_bug_submit_message(&out, _thread); }