4

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?

ChulK
  • 49
  • 6

1 Answers1

6

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.

apangin
  • 92,924
  • 10
  • 193
  • 247
  • thank you for your answer. how about heap size search in btrace? – ChulK Jun 09 '17 at 13:21
  • @ChulK How about [jstat](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/jstat.html)? It has no overhead at all. – apangin Jun 09 '17 at 21:54