Mercurial > hg > graal-compiler
diff src/share/vm/runtime/java.cpp @ 227:8d852b81e775
6694099: Hotspot vm_exit_out_of_memory should dump core
Summary: This fix enables the generation of core file when process runs out of C-heap.
Reviewed-by: sbohne
author | poonam |
---|---|
date | Sun, 22 Jun 2008 20:07:58 -0700 |
parents | 5a76ab815e34 |
children | 9c2ecc2ffb12 |
line wrap: on
line diff
--- a/src/share/vm/runtime/java.cpp Tue Jun 17 13:08:15 2008 -0700 +++ b/src/share/vm/runtime/java.cpp Sun Jun 22 20:07:58 2008 -0700 @@ -502,9 +502,9 @@ os::shutdown(); } -void vm_abort() { +void vm_abort(bool dump_core) { vm_perform_shutdown_actions(); - os::abort(PRODUCT_ONLY(false)); + os::abort(dump_core); ShouldNotReachHere(); } @@ -538,18 +538,24 @@ java_lang_Throwable::print_stack_trace(exception(), tty); tty->cr(); vm_notify_during_shutdown(NULL, NULL); - vm_abort(); + + // Failure during initialization, we don't want to dump core + vm_abort(false); } void vm_exit_during_initialization(symbolHandle ex, const char* message) { ResourceMark rm; vm_notify_during_shutdown(ex->as_C_string(), message); - vm_abort(); + + // Failure during initialization, we don't want to dump core + vm_abort(false); } void vm_exit_during_initialization(const char* error, const char* message) { vm_notify_during_shutdown(error, message); - vm_abort(); + + // Failure during initialization, we don't want to dump core + vm_abort(false); } void vm_shutdown_during_initialization(const char* error, const char* message) {