title: G1GC Log Rounding Values for Big Heaps
body: <p>The G1GC logging is printing <strong>Heap occupation values</strong> as <strong>rounded to MB or GB</strong>, is there a way how to <strong>print all values in KB or MB</strong>?</p>
  
  <p>I want to analyze Allocation and Promotion Rates and this rounding of values introduces imprecision. </p>
  
  <p>For example a GC event below shows total heap occupation being reduced from <code>11.7G-&gt;1826.2M</code> which shows only a rounded value of <code>11.7G</code> for total heap size prior the collection.  </p>
  
  <pre><code>4592.204: [GC pause (G1 Evacuation Pause) (young)
    [Eden: 9804.0M(9804.0M)-&gt;0.0B(9800.0M) Survivors: 112.0M-&gt;86.0M 
    Heap: 11.7G(15.0G)-&gt;1826.2M(15.0G)]
    ...
  </code></pre>
  
  <p>VM flags used:</p>
  
  <p><code>-Xms16g -Xmx16g -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps  -Xloggc:gc.log</code></p>
  
  <p>Using Hotspot JVM 1.8.0-b132.</p>