6765718: Indicate which thread throwing OOME when generating the heap dump at OOME

Emit a fake frame that makes it look like the thread is in the OutOfMemoryError zero-parameter constructor

Reviewed-by: dcubed
This commit is contained in:
Tomas Hurka 2010-09-11 08:18:31 +02:00
parent 059de12e57
commit ce872b40fb
3 changed files with 57 additions and 10 deletions

View file

@ -234,7 +234,7 @@ void report_java_out_of_memory(const char* message) {
// create heap dump before OnOutOfMemoryError commands are executed
if (HeapDumpOnOutOfMemoryError) {
tty->print_cr("java.lang.OutOfMemoryError: %s", message);
HeapDumper::dump_heap();
HeapDumper::dump_heap_from_oome();
}
if (OnOutOfMemoryError && OnOutOfMemoryError[0]) {