--- old/src/os/windows/vm/os_windows.cpp 2015-03-10 23:38:26.285482046 -0700 +++ new/src/os/windows/vm/os_windows.cpp 2015-03-10 23:38:26.170476286 -0700 @@ -1003,17 +1003,17 @@ // Default is to always create dump for debug builds, on product builds only dump on server versions of Windows. #ifndef ASSERT // If running on a client version of Windows and user has not explicitly enabled dumping - if (!os::win32::is_windows_server() && !CreateMinidumpOnCrash) { - VMError::report_coredump_status("Minidumps are not enabled by default on client versions of Windows", false); + if (!os::win32::is_windows_server() && !CreateCoredumpOnCrash) { + VMError::report_coredump_status("Coredumps are not enabled by default on client versions of Windows", false); return; // If running on a server version of Windows and user has explictly disabled dumping - } else if (os::win32::is_windows_server() && !FLAG_IS_DEFAULT(CreateMinidumpOnCrash) && !CreateMinidumpOnCrash) { - VMError::report_coredump_status("Minidump has been disabled from the command line", false); + } else if (os::win32::is_windows_server() && !FLAG_IS_DEFAULT(CreateCoredumpOnCrash) && !CreateCoredumpOnCrash) { + VMError::report_coredump_status("Coredump has been disabled from the command line", false); return; } #else - if (!FLAG_IS_DEFAULT(CreateMinidumpOnCrash) && !CreateMinidumpOnCrash) { - VMError::report_coredump_status("Minidump has been disabled from the command line", false); + if (!FLAG_IS_DEFAULT(CreateCoredumpOnCrash) && !CreateCoredumpOnCrash) { + VMError::report_coredump_status("Coredump has been disabled from the command line", false); return; } #endif --- old/src/share/vm/runtime/arguments.cpp 2015-03-10 23:38:26.850510351 -0700 +++ new/src/share/vm/runtime/arguments.cpp 2015-03-10 23:38:26.716503638 -0700 @@ -3300,6 +3300,15 @@ "ManagementServer is not supported in this VM.\n"); return JNI_ERR; #endif // INCLUDE_MANAGEMENT + // CreateMinidumpOnCrash is removed, and replaced by CreateCoredumpOnCrash + } else if (match_option(option, "-XX:+CreateMinidumpOnCrash", &tail)) { + FLAG_SET_CMDLINE(bool, CreateCoredumpOnCrash, true); + jio_fprintf(defaultStream::output_stream(), + "CreateMinidumpOnCrash is replaced by CreateCoredumpOnCrash: CreateCoredumpOnCrash is on\n"); + } else if (match_option(option, "-XX:-CreateMinidumpOnCrash", &tail)) { + FLAG_SET_CMDLINE(bool, CreateCoredumpOnCrash, false); + jio_fprintf(defaultStream::output_stream(), + "CreateMinidumpOnCrash is replaced by CreateCoredumpOnCrash: CreateCoredumpOnCrash is off\n"); } else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx // Skip -XX:Flags= since that case has already been handled if (strncmp(tail, "Flags=", strlen("Flags=")) != 0) { --- old/src/share/vm/runtime/globals.hpp 2015-03-10 23:38:27.374536604 -0700 +++ new/src/share/vm/runtime/globals.hpp 2015-03-10 23:38:27.242529990 -0700 @@ -933,7 +933,7 @@ product(bool, ShowMessageBoxOnError, false, \ "Keep process alive on VM fatal error") \ \ - product(bool, CreateMinidumpOnCrash, false, \ + product(bool, CreateCoredumpOnCrash, true, \ "Create minidump on VM fatal error") \ \ product_pd(bool, UseOSErrorReporting, \ --- old/src/share/vm/utilities/vmError.cpp 2015-03-10 23:38:27.889562404 -0700 +++ new/src/share/vm/utilities/vmError.cpp 2015-03-10 23:38:27.773556592 -0700 @@ -505,10 +505,14 @@ } STEP(63, "(printing core file information)") st->print("# "); - if (coredump_status) { - st->print("Core dump written. Default location: %s", coredump_message); + if (CreateCoredumpOnCrash) { + if (coredump_status) { + st->print("Core dump written. Default location: %s", coredump_message); + } else { + st->print("Failed to write core dump. %s", coredump_message); + } } else { - st->print("Failed to write core dump. %s", coredump_message); + st->print("CreateCoredumpOnCrash turned off, no core file dumped"); } st->cr(); st->print_cr("#"); @@ -898,7 +902,7 @@ static bool transmit_report_done = false; // done error reporting if (SuppressFatalErrorMessage) { - os::abort(); + os::abort(CreateCoredumpOnCrash); } jlong mytid = os::current_thread_id(); if (first_error == NULL && @@ -1088,7 +1092,7 @@ if (!skip_os_abort) { skip_os_abort = true; bool dump_core = should_report_bug(first_error->_id); - os::abort(dump_core); + os::abort(dump_core && CreateCoredumpOnCrash); } // if os::abort() doesn't abort, try os::die(); --- old/test/runtime/ErrorHandling/ProblematicFrameTest.java 2015-03-10 23:38:28.371586552 -0700 +++ new/test/runtime/ErrorHandling/ProblematicFrameTest.java 2015-03-10 23:38:28.255580740 -0700 @@ -44,7 +44,7 @@ public static void main(String[] args) throws Exception { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( - "-Xmx64m", "-XX:-TransmitErrorReport", "-XX:-CreateMinidumpOnCrash", Crasher.class.getName()); + "-Xmx64m", "-XX:-TransmitErrorReport", "-XX:-CreateCoredumpOnCrash", Crasher.class.getName()); OutputAnalyzer output = new OutputAnalyzer(pb.start()); output.shouldNotMatch("error occurred during error reporting \\(printing problematic frame\\)"); } --- old/test/runtime/Safepoint/AssertSafepointCheckConsistency1.java 2015-03-10 23:38:32.028769760 -0700 +++ new/test/runtime/Safepoint/AssertSafepointCheckConsistency1.java 2015-03-10 23:38:31.909763799 -0700 @@ -47,7 +47,7 @@ "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", "-XX:-TransmitErrorReport", - "-XX:-CreateMinidumpOnCrash", + "-XX:-CreateCoredumpOnCrash", "-Xmx32m", "AssertSafepointCheckConsistency1", "test"); --- old/test/runtime/Safepoint/AssertSafepointCheckConsistency2.java 2015-03-10 23:38:32.621799469 -0700 +++ new/test/runtime/Safepoint/AssertSafepointCheckConsistency2.java 2015-03-10 23:38:32.490792906 -0700 @@ -47,7 +47,7 @@ "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", "-XX:-TransmitErrorReport", - "-XX:-CreateMinidumpOnCrash", + "-XX:-CreateCoredumpOnCrash", "-Xmx32m", "AssertSafepointCheckConsistency2", "test"); --- old/test/runtime/Safepoint/AssertSafepointCheckConsistency3.java 2015-03-10 23:38:33.199828425 -0700 +++ new/test/runtime/Safepoint/AssertSafepointCheckConsistency3.java 2015-03-10 23:38:33.081822513 -0700 @@ -47,7 +47,7 @@ "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", "-XX:-TransmitErrorReport", - "-XX:-CreateMinidumpOnCrash", + "-XX:-CreateCoredumpOnCrash", "-Xmx32m", "AssertSafepointCheckConsistency3", "test"); --- old/test/runtime/Safepoint/AssertSafepointCheckConsistency4.java 2015-03-10 23:38:33.777857383 -0700 +++ new/test/runtime/Safepoint/AssertSafepointCheckConsistency4.java 2015-03-10 23:38:33.661851570 -0700 @@ -47,7 +47,7 @@ "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", "-XX:-TransmitErrorReport", - "-XX:-CreateMinidumpOnCrash", + "-XX:-CreateCoredumpOnCrash", "-Xmx32m", "AssertSafepointCheckConsistency4", "test");