Learner
Learner

Reputation: 1523

How to use ThreadDumpVisualizer IntelliJ IDEA plugin to analyze Java thread dump

I was looking to use some thread dump analyzer to analyze Java thread dump and installed the ThreadDumpVisualizer IntelliJ IDEA plugin but am not sure how to use it. The plugin page: https://plugins.jetbrains.com/plugin/9358-threaddumpvisualizer also does not contain any documentation. Can I load my existing thread dump using this plugin? I have restriction on downloading from external public site on my work/company machine so I am trying this out.

Upvotes: 3

Views: 13943

Answers (2)

bagonyi
bagonyi

Reputation: 3328

There is a description on its GitHub repo: https://github.com/enslinmike/Thread-dump-visualizer (Update: the owner seems to have taken down the repo. Here is the archived README.)

Thread-dump-visualizer

This is plugin for ItelliJ IDEA. The goal of this plugin is to provide handy way of analyzing thread dumps of IntelliJ IDEA. You can get latest version here

To see dump's details you should drag and drop file with it to "Thread dumps" tool window. Following options are supported:

  • .txt file. Please note that only IDEA format is supported. Other formats are not supported.
  • .zip file with some proper .txt dump files
  • .dbconf file with connection information to MongoDB. Data should be in collection named "ThreadDumps" Example: { "host" : "127.0.0.1", "port" : 27017, "dbName" : "test" }

[...]

Upvotes: 2

Ashish Mishra
Ashish Mishra

Reputation: 303

This plugin does not have any documentation, that is true. I could not add one, so put the same in a comment https://plugins.jetbrains.com/plugin/9358-threaddumpvisualizer#comment=27907

Assuming that you have already taken a thread-dump of your favourite jvm process as a text using any tool like jvisualvm, jconsole, jstack etc.

Here are simple steps on how to get going with this plugin:

  1. Click on Analyze > Analyze Stacktrace ..
  2. This opens a dialog popup with a large text field with instructions "Put a stack trace or complete thread dump here:"
  3. In the text field you can paste thread dump text or stack trace text
  4. At bottom, there is an option to select "Automatically detect and analyze thread dumps copied to the clipboard outside of IntelliJ IDEA"
  5. Click "Normalize" followed by "OK"
  6. In Run window pane at bottom, you will find a tab "Threads" appearing with list of threads in left side, and method-trace / call-trace at right side
  7. You can see left side thread names will be showing the state or condition they are waiting on, appended
  8. You can sort threads by name, filter, export, copy to clipboard
  9. That is it! It's just a visualizer. We have to use our own mind to analyze blocked, waiting, starving threads and their respective root-causes :)

Upvotes: 1

Related Questions