comparison src/share/vm/utilities/vmError.cpp @ 1119:547f81740344

6361589: Print out stack trace for target thread of GC crash Summary: If GC crashed with java thread involved, print out the java stack trace in error report Reviewed-by: never, ysr, coleenp, dholmes
author minqi
date Fri, 11 Dec 2009 11:09:49 -0800
parents 354d3184f6b2
children a2ea687fdc7c
comparison
equal deleted inserted replaced
1118:3115100553b5 1119:547f81740344
500 } 500 }
501 } 501 }
502 #endif // ZERO 502 #endif // ZERO
503 } 503 }
504 504
505 STEP(135, "(printing target Java thread stack)" )
506
507 // printing Java thread stack trace if it is involved in GC crash
508 if (_verbose && (_thread->is_Named_thread())) {
509 JavaThread* jt = ((NamedThread *)_thread)->processed_thread();
510 if (jt != NULL) {
511 st->print_cr("JavaThread " PTR_FORMAT " (nid = " UINTX_FORMAT ") was being processed", jt, jt->osthread()->thread_id());
512 if (jt->has_last_Java_frame()) {
513 st->print_cr("Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)");
514 for(StackFrameStream sfs(jt); !sfs.is_done(); sfs.next()) {
515 sfs.current()->print_on_error(st, buf, sizeof(buf), true);
516 st->cr();
517 }
518 }
519 }
520 }
521
505 STEP(140, "(printing VM operation)" ) 522 STEP(140, "(printing VM operation)" )
506 523
507 if (_verbose && _thread && _thread->is_VM_thread()) { 524 if (_verbose && _thread && _thread->is_VM_thread()) {
508 VMThread* t = (VMThread*)_thread; 525 VMThread* t = (VMThread*)_thread;
509 VM_Operation* op = t->vm_operation(); 526 VM_Operation* op = t->vm_operation();