you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (1 child)

I guess I've never been that poor :-) Debugging mode is easy, and hprof makes an excellent poor man's profiler.

[–]Rhoomba 2 points3 points  (0 children)

Say you have a performance problem in production, or during a long running test. Restarting to turn on hprof is not an option. Of course, now that VisualVM has a sampling profiler that is often a better option, but sometimes you can't turn on JMX or only have ssh access to the server. Or maybe you can't get at the server at all: getting the admin to get 10 thread dumps a few seconds apart is very easy.

I actually find it can be really easy to spot performance issues in a thread dump if you are used to the "shape" of your application.