Search code examples
javajvisualvm

How to get "jvisualvm Threads Inspector" working?


jvisualvm 1.8.0_60 Threads Inspector 1.0.1 is installed and Active but when I open a .hprof file there are no stacks in the "Threads at the heap dump" section of the summary tab, just a list of thread names. Nothing reported on out or err.

/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/jvisualvm --modules --list | grep -i thread
com.sun.tools.visualvm.threaddump                 1.0     Enabled  
com.sun.tools.visualvm.modules.threadinspect      1.0.1   Enabled  

I'm sure this used to work in jdk1.7, but I need it working in jdk1.8.

I tried "eclipse Memory Analyzer" but it errored out with

An internal error occurred during: "Parsing heap dump from 'fail.hprof'".
java.lang.NullPointerException

the file was obtained with

jmap -F -dump:format=b,file=fail.hprof 1234

Anyone able to reproduce this issue or know of a work around?


Solution

  • "Threads Inspector" will only work without the -F flag. In fact most snapshot inspectors won't work at all with the -F flag;

    • yourkit
    • jprofiler
    • eclipse Memory Analyzer

    Some will partially work;

    • jhat
    • jvisualvm