< prev index next >

src/hotspot/share/utilities/debug.cpp

Print this page
rev 59103 : imported patch hotspot


 623     mh->print_codes_on(tty);
 624   }
 625 }
 626 
 627 // int versions of all methods to avoid having to type type casts in the debugger
 628 
 629 void pp(intptr_t p)          { pp((void*)p); }
 630 void pp(oop p)               { pp((void*)p); }
 631 
 632 void help() {
 633   Command c("help");
 634   tty->print_cr("basic");
 635   tty->print_cr("  pp(void* p)   - try to make sense of p");
 636   tty->print_cr("  pv(intptr_t p)- ((PrintableResourceObj*) p)->print()");
 637   tty->print_cr("  ps()          - print current thread stack");
 638   tty->print_cr("  pss()         - print all thread stacks");
 639   tty->print_cr("  pm(int pc)    - print Method* given compiled PC");
 640   tty->print_cr("  findm(intptr_t pc) - finds Method*");
 641   tty->print_cr("  find(intptr_t x)   - finds & prints nmethod/stub/bytecode/oop based on pointer into it");
 642   tty->print_cr("  pns(void* sp, void* fp, void* pc)  - print native (i.e. mixed) stack trace. E.g.");
 643   tty->print_cr("                   pns($sp, $rbp, $pc) on Linux/amd64 and Solaris/amd64 or");
 644   tty->print_cr("                   pns($sp, $ebp, $pc) on Linux/x86 or");
 645   tty->print_cr("                   pns($sp, $fp, $pc)  on Linux/AArch64 or");
 646   tty->print_cr("                   pns($sp, 0, $pc)    on Linux/ppc64 or");
 647   tty->print_cr("                   pns($sp, $s8, $pc)  on Linux/mips or");
 648   tty->print_cr("                   pns($sp + 0x7ff, 0, $pc) on Solaris/SPARC");
 649   tty->print_cr("                 - in gdb do 'set overload-resolution off' before calling pns()");
 650   tty->print_cr("                 - in dbx do 'frame 1' before calling pns()");
 651 
 652   tty->print_cr("misc.");
 653   tty->print_cr("  flush()       - flushes the log file");
 654   tty->print_cr("  events()      - dump events from ring buffers");
 655 
 656 
 657   tty->print_cr("compiler debugging");
 658   tty->print_cr("  debug()       - to set things up for compiler debugging");
 659   tty->print_cr("  ndebug()      - undo debug");
 660 }
 661 
 662 extern "C" void pns(void* sp, void* fp, void* pc) { // print native stack
 663   Command c("pns");
 664   static char buf[O_BUFLEN];
 665   Thread* t = Thread::current_or_null();
 666   // Call generic frame constructor (certain arguments may be ignored)
 667   frame fr(sp, fp, pc);
 668   VMError::print_native_stack(tty, fr, t, buf, sizeof(buf));




 623     mh->print_codes_on(tty);
 624   }
 625 }
 626 
 627 // int versions of all methods to avoid having to type type casts in the debugger
 628 
 629 void pp(intptr_t p)          { pp((void*)p); }
 630 void pp(oop p)               { pp((void*)p); }
 631 
 632 void help() {
 633   Command c("help");
 634   tty->print_cr("basic");
 635   tty->print_cr("  pp(void* p)   - try to make sense of p");
 636   tty->print_cr("  pv(intptr_t p)- ((PrintableResourceObj*) p)->print()");
 637   tty->print_cr("  ps()          - print current thread stack");
 638   tty->print_cr("  pss()         - print all thread stacks");
 639   tty->print_cr("  pm(int pc)    - print Method* given compiled PC");
 640   tty->print_cr("  findm(intptr_t pc) - finds Method*");
 641   tty->print_cr("  find(intptr_t x)   - finds & prints nmethod/stub/bytecode/oop based on pointer into it");
 642   tty->print_cr("  pns(void* sp, void* fp, void* pc)  - print native (i.e. mixed) stack trace. E.g.");
 643   tty->print_cr("                   pns($sp, $rbp, $pc) on Linux/amd64 or");
 644   tty->print_cr("                   pns($sp, $ebp, $pc) on Linux/x86 or");
 645   tty->print_cr("                   pns($sp, $fp, $pc)  on Linux/AArch64 or");
 646   tty->print_cr("                   pns($sp, 0, $pc)    on Linux/ppc64 or");
 647   tty->print_cr("                   pns($sp, $s8, $pc)  on Linux/mips or");

 648   tty->print_cr("                 - in gdb do 'set overload-resolution off' before calling pns()");
 649   tty->print_cr("                 - in dbx do 'frame 1' before calling pns()");
 650 
 651   tty->print_cr("misc.");
 652   tty->print_cr("  flush()       - flushes the log file");
 653   tty->print_cr("  events()      - dump events from ring buffers");
 654 
 655 
 656   tty->print_cr("compiler debugging");
 657   tty->print_cr("  debug()       - to set things up for compiler debugging");
 658   tty->print_cr("  ndebug()      - undo debug");
 659 }
 660 
 661 extern "C" void pns(void* sp, void* fp, void* pc) { // print native stack
 662   Command c("pns");
 663   static char buf[O_BUFLEN];
 664   Thread* t = Thread::current_or_null();
 665   // Call generic frame constructor (certain arguments may be ignored)
 666   frame fr(sp, fp, pc);
 667   VMError::print_native_stack(tty, fr, t, buf, sizeof(buf));


< prev index next >