javaperformancejvmheap-dumpjmap

is JVM stopped while executing jmap -heap option?


usage) Jmap -heap [PID]

Hello I have jmap question

I want to view only size (-heap option) Heap Dump No...

If I run [jmap -heap PID] running jvm process is STOP THE WORLD?


Solution

  • Yes, jmap -heap will cause stop-the-world pause. Moreover, not only application threads will be stopped, but the whole target process.

    jmap -heap works through HotSpot Serviceability Agent which implies that the target process is suspended while a tool is running.

    More details about how Serviceability Agent works are in this answer.