We need to debug a Java application that randomly does things that it shouldn't do.
To understand the root cause of the problem, we need to get a stack when a particular method is called. It sounds simple (add Thread.dumpStack()to this particular method), however it is a code class from the JDK, so we really don't want to mess with it (even if we really could).
Does anyone know if we can implement some kind of “listener” in the JVM that will detect when a particular method is called and unload the stack trace?
This is a production system, so if the solution is a debugger, we will need to have something that has a very limited impact on performance.
Thanks for your input.
source
share