title: why there is difference in Heap dump size generated by jmap and jcmd?
body: <p>I am trying to take heap dump using below 2 commands</p>
  
  <ol>
  <li>jcmd $pid GC.heap_dump /tmp/filename.dump </li>
  <li>jmap -dump:format=b,file=/tmp/filename.dump $pid</li>
  </ol>
  
  <p>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 ?</p>
  
  <p>JDK is 1.8.0_162</p>
  
  <p>Xms and Xmx is 4G</p>