jstack (being SA-based) is designed to attach to a core file or hung process. If you use it to get a stack trace of a running application then it requires suspending the target VM while the utility attaches. Furthermore, as the utility is working from a snapshot of the process there is no guarantee that it will see all stacks in a consistent state. As part of the VM attach mechanism (6173612) we will have the ability to send the output from the control-break handler (ctrl-\ or ctrl-break) back to the attaching tool. This RFE is submitted with a view to changing jstack so that "jstack <pid>" can be used to get a stack trace from the target VM without any interference. The result is that the output of the utilitiy would be identical to the output for the SIGUIT/ctrl-break case. It would also be immediate and it works on all platforms. Note that the SA code wouldn't be removed - rather a "-f" option could be used to "force" a stack trace when the process is hung. Also "jstack <core>" and "jstack -m <pid>" wouldn't be changed. ###@###.### 2005-04-22 15:52:50 GMT
|