I am trying to take heap dump using below 2 commands
- jcmd $pid GC.heap_dump /tmp/filename.dump
- jmap -dump:format=b,file=/tmp/filename.dump $pid
jcmd produces file size of ~300M and jmap produces file size of ~1.4G. why these are different sizes, do we have any additional information in jmap ? am I missing some arguments in jcmd ?
JDK is 1.8.0_162
Xms and Xmx is 4G