Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
226:d5ba4f8aa38a | 227:8d852b81e775 |
---|---|
500 { | 500 { |
501 vm_perform_shutdown_actions(); | 501 vm_perform_shutdown_actions(); |
502 os::shutdown(); | 502 os::shutdown(); |
503 } | 503 } |
504 | 504 |
505 void vm_abort() { | 505 void vm_abort(bool dump_core) { |
506 vm_perform_shutdown_actions(); | 506 vm_perform_shutdown_actions(); |
507 os::abort(PRODUCT_ONLY(false)); | 507 os::abort(dump_core); |
508 ShouldNotReachHere(); | 508 ShouldNotReachHere(); |
509 } | 509 } |
510 | 510 |
511 void vm_notify_during_shutdown(const char* error, const char* message) { | 511 void vm_notify_during_shutdown(const char* error, const char* message) { |
512 if (error != NULL) { | 512 if (error != NULL) { |
536 java_lang_Throwable::print(exception, tty); | 536 java_lang_Throwable::print(exception, tty); |
537 tty->cr(); | 537 tty->cr(); |
538 java_lang_Throwable::print_stack_trace(exception(), tty); | 538 java_lang_Throwable::print_stack_trace(exception(), tty); |
539 tty->cr(); | 539 tty->cr(); |
540 vm_notify_during_shutdown(NULL, NULL); | 540 vm_notify_during_shutdown(NULL, NULL); |
541 vm_abort(); | 541 |
542 // Failure during initialization, we don't want to dump core | |
543 vm_abort(false); | |
542 } | 544 } |
543 | 545 |
544 void vm_exit_during_initialization(symbolHandle ex, const char* message) { | 546 void vm_exit_during_initialization(symbolHandle ex, const char* message) { |
545 ResourceMark rm; | 547 ResourceMark rm; |
546 vm_notify_during_shutdown(ex->as_C_string(), message); | 548 vm_notify_during_shutdown(ex->as_C_string(), message); |
547 vm_abort(); | 549 |
550 // Failure during initialization, we don't want to dump core | |
551 vm_abort(false); | |
548 } | 552 } |
549 | 553 |
550 void vm_exit_during_initialization(const char* error, const char* message) { | 554 void vm_exit_during_initialization(const char* error, const char* message) { |
551 vm_notify_during_shutdown(error, message); | 555 vm_notify_during_shutdown(error, message); |
552 vm_abort(); | 556 |
557 // Failure during initialization, we don't want to dump core | |
558 vm_abort(false); | |
553 } | 559 } |
554 | 560 |
555 void vm_shutdown_during_initialization(const char* error, const char* message) { | 561 void vm_shutdown_during_initialization(const char* error, const char* message) { |
556 vm_notify_during_shutdown(error, message); | 562 vm_notify_during_shutdown(error, message); |
557 vm_shutdown(); | 563 vm_shutdown(); |