The ps() function in debug.cpp would be so much nicer if it called print_stack in debug mode, and trace_stack() with the addition of Verbose.
JavaThread::print_stack() also prints held locks which makes it especially helpful.
JavaThread::print_stack() also prints held locks which makes it especially helpful.