src/share/vm/utilities/vmError.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8035983 Sdiff src/share/vm/utilities

src/share/vm/utilities/vmError.cpp

Print this page




 573 
 574   STEP(120, "(printing native stack)" )
 575 
 576      if (_verbose) {
 577      if (os::platform_print_native_stack(st, _context, buf, sizeof(buf))) {
 578        // We have printed the native stack in platform-specific code
 579        // Windows/x64 needs special handling.
 580      } else {
 581        frame fr = _context ? os::fetch_frame_from_context(_context)
 582                            : os::current_frame();
 583 
 584        // see if it's a valid frame
 585        if (fr.pc()) {
 586           st->print_cr("Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)");
 587 
 588 
 589           int count = 0;
 590           while (count++ < StackPrintLimit) {
 591              fr.print_on_error(st, buf, sizeof(buf));
 592              st->cr();



 593              // Compiled code may use EBP register on x86 so it looks like
 594              // non-walkable C frame. Use frame.sender() for java frames.
 595              if (_thread && _thread->is_Java_thread() && fr.is_java_frame()) {
 596                RegisterMap map((JavaThread*)_thread, false); // No update
 597                fr = fr.sender(&map);
 598                continue;
 599              }
 600              if (os::is_first_C_frame(&fr)) break;
 601              fr = os::get_sender_for_C_frame(&fr);
 602           }

 603 
 604           if (count > StackPrintLimit) {
 605              st->print_cr("...<more frames>...");
 606           }
 607 
 608           st->cr();
 609        }
 610      }
 611    }
 612 
 613   STEP(130, "(printing Java stack)" )
 614 
 615      if (_verbose && _thread && _thread->is_Java_thread()) {
 616        print_stack_trace(st, (JavaThread*)_thread, buf, sizeof(buf));
 617      }
 618 
 619   STEP(135, "(printing target Java thread stack)" )
 620 
 621      // printing Java thread stack trace if it is involved in GC crash
 622      if (_verbose && _thread && (_thread->is_Named_thread())) {




 573 
 574   STEP(120, "(printing native stack)" )
 575 
 576      if (_verbose) {
 577      if (os::platform_print_native_stack(st, _context, buf, sizeof(buf))) {
 578        // We have printed the native stack in platform-specific code
 579        // Windows/x64 needs special handling.
 580      } else {
 581        frame fr = _context ? os::fetch_frame_from_context(_context)
 582                            : os::current_frame();
 583 
 584        // see if it's a valid frame
 585        if (fr.pc()) {
 586           st->print_cr("Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)");
 587 
 588 
 589           int count = 0;
 590           while (count++ < StackPrintLimit) {
 591              fr.print_on_error(st, buf, sizeof(buf));
 592              st->cr();
 593              // Catch very first native frame by using stack address.
 594              if (!_thread->on_local_stack((address)(fr.sp() + 4))) break;
 595 
 596              // Compiled code may use EBP register on x86 so it looks like
 597              // non-walkable C frame. Use frame.sender() for java frames.
 598              if (_thread && _thread->is_Java_thread() && fr.is_java_frame()) {
 599                RegisterMap map((JavaThread*)_thread, false); // No update
 600                fr = fr.sender(&map);
 601              } else {


 602                fr = os::get_sender_for_C_frame(&fr);
 603              }
 604           }
 605 
 606           if (count > StackPrintLimit) {
 607              st->print_cr("...<more frames>...");
 608           }
 609 
 610           st->cr();
 611        }
 612      }
 613    }
 614 
 615   STEP(130, "(printing Java stack)" )
 616 
 617      if (_verbose && _thread && _thread->is_Java_thread()) {
 618        print_stack_trace(st, (JavaThread*)_thread, buf, sizeof(buf));
 619      }
 620 
 621   STEP(135, "(printing target Java thread stack)" )
 622 
 623      // printing Java thread stack trace if it is involved in GC crash
 624      if (_verbose && _thread && (_thread->is_Named_thread())) {


src/share/vm/utilities/vmError.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File