7014918: Improve core/minidump handling in Hotspot

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
This commit is contained in:
Christian Tornqvist 2011-02-09 11:08:10 +01:00
parent 8ff932b950
commit 237866941a
8 changed files with 232 additions and 11 deletions

View file

@ -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 @@ static void print_bug_submit_message(outputStream *out, Thread *thread) {
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 @@ void VMError::report(outputStream* st) {
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 @@ void VMError::report_and_die() {
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();