569 } 570 571 st->cr(); 572 } 573 574 STEP(120, "(printing native stack)" ) 575 576 if (_verbose) { 577 frame fr = _context ? os::fetch_frame_from_context(_context) 578 : os::current_frame(); 579 580 // see if it's a valid frame 581 if (fr.pc()) { 582 st->print_cr("Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)"); 583 584 585 int count = 0; 586 while (count++ < StackPrintLimit) { 587 fr.print_on_error(st, buf, sizeof(buf)); 588 st->cr(); 589 if (os::is_first_C_frame(&fr)) break; 590 fr = os::get_sender_for_C_frame(&fr); 591 } 592 593 if (count > StackPrintLimit) { 594 st->print_cr("...<more frames>..."); 595 } 596 597 st->cr(); 598 } 599 } 600 601 STEP(130, "(printing Java stack)" ) 602 603 if (_verbose && _thread && _thread->is_Java_thread()) { 604 print_stack_trace(st, (JavaThread*)_thread, buf, sizeof(buf)); 605 } 606 607 STEP(135, "(printing target Java thread stack)" ) 608 | 569 } 570 571 st->cr(); 572 } 573 574 STEP(120, "(printing native stack)" ) 575 576 if (_verbose) { 577 frame fr = _context ? os::fetch_frame_from_context(_context) 578 : os::current_frame(); 579 580 // see if it's a valid frame 581 if (fr.pc()) { 582 st->print_cr("Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)"); 583 584 585 int count = 0; 586 while (count++ < StackPrintLimit) { 587 fr.print_on_error(st, buf, sizeof(buf)); 588 st->cr(); 589 // Compiled code may use EBP register on x86 so it looks like 590 // non-walkable C frame. Use frame.sender() for java frames. 591 if (_thread && _thread->is_Java_thread() && fr.is_java_frame()) { 592 RegisterMap map((JavaThread*)_thread, false); // No update 593 fr = fr.sender(&map); 594 continue; 595 } 596 if (os::is_first_C_frame(&fr)) break; 597 fr = os::get_sender_for_C_frame(&fr); 598 } 599 600 if (count > StackPrintLimit) { 601 st->print_cr("...<more frames>..."); 602 } 603 604 st->cr(); 605 } 606 } 607 608 STEP(130, "(printing Java stack)" ) 609 610 if (_verbose && _thread && _thread->is_Java_thread()) { 611 print_stack_trace(st, (JavaThread*)_thread, buf, sizeof(buf)); 612 } 613 614 STEP(135, "(printing target Java thread stack)" ) 615 |