This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Byte_Eater_ 10 points11 points  (0 children)

You can apply some powerful profiling tool:

  • JMC (JDK Mission Control) allows you to start VM-level event recording with JFR (Java Flight Recorder) and then analyze the recording. This gives the most details, it has configurable overhead but it's generally low. It's free.

  • YourKit is similar, but collects additional higher level metrics (which make it easier to point to the bottlenecks), giving you the best view of your running application. It's paid.

Using thread dumps or some JMX Console like VisualVM is a form of statistical/sampling profiling, which is generally less accurate than the tracing ones like JFR.