754 tty->print_cr(" pns($sp + 0x7ff, 0, $pc) on Solaris/SPARC");
755 tty->print_cr(" - in gdb do 'set overload-resolution off' before calling pns()");
756 tty->print_cr(" - in dbx do 'frame 1' before calling pns()");
757
758 tty->print_cr("misc.");
759 tty->print_cr(" flush() - flushes the log file");
760 tty->print_cr(" events() - dump events from ring buffers");
761
762
763 tty->print_cr("compiler debugging");
764 tty->print_cr(" debug() - to set things up for compiler debugging");
765 tty->print_cr(" ndebug() - undo debug");
766 }
767
768 #endif // !PRODUCT
769
770 void print_native_stack(outputStream* st, frame fr, Thread* t, char* buf, int buf_size) {
771
772 // see if it's a valid frame
773 if (fr.pc()) {
774 st->print_cr("Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)");
775
776 int count = 0;
777 while (count++ < StackPrintLimit) {
778 fr.print_on_error(st, buf, buf_size);
779 st->cr();
780 // Compiled code may use EBP register on x86 so it looks like
781 // non-walkable C frame. Use frame.sender() for java frames.
782 if (t && t->is_Java_thread()) {
783 // Catch very first native frame by using stack address.
784 // For JavaThread stack_base and stack_size should be set.
785 if (!t->on_local_stack((address)(fr.real_fp() + 1))) {
786 break;
787 }
788 if (fr.is_java_frame() || fr.is_native_frame() || fr.is_runtime_frame()) {
789 RegisterMap map((JavaThread*)t, false); // No update
790 fr = fr.sender(&map);
791 } else {
792 fr = os::get_sender_for_C_frame(&fr);
793 }
794 } else {
|
754 tty->print_cr(" pns($sp + 0x7ff, 0, $pc) on Solaris/SPARC");
755 tty->print_cr(" - in gdb do 'set overload-resolution off' before calling pns()");
756 tty->print_cr(" - in dbx do 'frame 1' before calling pns()");
757
758 tty->print_cr("misc.");
759 tty->print_cr(" flush() - flushes the log file");
760 tty->print_cr(" events() - dump events from ring buffers");
761
762
763 tty->print_cr("compiler debugging");
764 tty->print_cr(" debug() - to set things up for compiler debugging");
765 tty->print_cr(" ndebug() - undo debug");
766 }
767
768 #endif // !PRODUCT
769
770 void print_native_stack(outputStream* st, frame fr, Thread* t, char* buf, int buf_size) {
771
772 // see if it's a valid frame
773 if (fr.pc()) {
774 st->print_cr("Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)");
775
776 int count = 0;
777 while (count++ < StackPrintLimit) {
778 fr.print_on_error(st, buf, buf_size);
779 st->cr();
780 // Compiled code may use EBP register on x86 so it looks like
781 // non-walkable C frame. Use frame.sender() for java frames.
782 if (t && t->is_Java_thread()) {
783 // Catch very first native frame by using stack address.
784 // For JavaThread stack_base and stack_size should be set.
785 if (!t->on_local_stack((address)(fr.real_fp() + 1))) {
786 break;
787 }
788 if (fr.is_java_frame() || fr.is_native_frame() || fr.is_runtime_frame()) {
789 RegisterMap map((JavaThread*)t, false); // No update
790 fr = fr.sender(&map);
791 } else {
792 fr = os::get_sender_for_C_frame(&fr);
793 }
794 } else {
|