Found some interesting helper functions in utilities/debug.cpp
:
void help() {
Command c("help");
tty->print_cr("basic");
tty->print_cr(" pp(void* p) - try to make sense of p");
tty->print_cr(" pv(intptr_t p)- ((PrintableResourceObj*) p)->print()");
tty->print_cr(" ps() - print current thread stack");
tty->print_cr(" pss() - print all thread stacks");
tty->print_cr(" pm(int pc) - print methodOop given compiled PC");
tty->print_cr(" findm(intptr_t pc) - finds methodOop");
tty->print_cr(" find(intptr_t x) - finds & prints nmethod/stub/bytecode/oop based on pointer into it");
tty->print_cr("misc.");
tty->print_cr(" flush() - flushes the log file");
tty->print_cr(" events() - dump last 50 events");
tty->print_cr("compiler debugging");
tty->print_cr(" debug() - to set things up for compiler debugging");
tty->print_cr(" ndebug() - undo debug");
}
More commands such as "dump_vtable", "nm", "disnm", etc., are available in the same file.