Mercurial > hg > graal-jvmci-8
diff src/share/vm/utilities/vmError.cpp @ 2204:63d374c54045
7014918: Improve core/minidump handling in Hotspot
Summary: Added Minidump support on Windows, enabled large page core dumps when coredump_filter is present and writing out path/rlimit for core dumps.
Reviewed-by: poonam, dsamersoff, sla, coleenp
author | ctornqvi |
---|---|
date | Wed, 09 Feb 2011 11:08:10 +0100 |
parents | d8a72fbc4be7 |
children | da091bb67459 |
line wrap: on
line diff
--- a/src/share/vm/utilities/vmError.cpp Tue Feb 08 22:27:57 2011 -0800 +++ b/src/share/vm/utilities/vmError.cpp Wed Feb 09 11:08:10 2011 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -201,6 +201,15 @@ out->print_raw_cr("#"); } +bool VMError::coredump_status; +char VMError::coredump_message[O_BUFLEN]; + +void VMError::report_coredump_status(const char* message, bool status) { + coredump_status = status; + strncpy(coredump_message, message, sizeof(coredump_message)); + coredump_message[sizeof(coredump_message)-1] = 0; +} + // Return a string to describe the error char* VMError::error_string(char* buf, int buflen) { @@ -454,6 +463,15 @@ st->cr(); st->print_cr("#"); } + STEP(63, "(printing core file information)") + st->print("# "); + if (coredump_status) { + st->print("Core dump written. Default location: %s", coredump_message); + } else { + st->print("Failed to write core dump. %s", coredump_message); + } + st->print_cr(""); + st->print_cr("#"); STEP(65, "(printing bug submit message)") @@ -792,6 +810,9 @@ ShowMessageBoxOnError = false; } + // Write a minidump on Windows, check core dump limits on Linux/Solaris + os::check_or_create_dump(_siginfo, _context, buffer, sizeof(buffer)); + // reset signal handlers or exception filter; make sure recursive crashes // are handled properly. reset_signal_handlers();