<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Thomas,<div><br></div><div>Indeed… strange but I can see it this morning... but it’s not possible for me to comment on it. </div><div><br></div><div><span style="font-size: small;">Ok, I agree, not a fantastically high priority item but that would be my comment if I were able to comment.</span></div><div><br></div><div>The problem of the <span style="background-color: rgb(255, 255, 255); white-space: pre-wrap;">subtle rounding error is due to the fact that log records, instead of sharing common formats, define their own. So while one set of records share </span><font size="2">EXT_SIZE_FORMAT (g1CollectorPolicy.cpp:#define EXT_SIZE_FORMAT “%.1f%s” other records use a completely separate integer definition. In my experience most people use either Censum or one of the OSS tools or a home grown tool to look at these logs which implies that human readability is less important. And if humans want values to be rounded a flag like -XX:PrintMemoryRounding=[G,M,K,B] could be introduced. I’m not a fan of G1LogLevel=finest as this turns on bags of stuff that may or may not be relevant to the problem at hand and increases the complexity of parsing the log files. This is especially true in light of the corruption that often occurs in both CMS and G1 logs that can be difficult to untangle.</font></div><div><span style="font-size: small;"><br></span></div><div><span style="font-size: small;"><br></span></div><div><font size="2">Format isn’t typically that much of a problem for the home grown folks as they only deal with 1 log format, theirs. If it changes when they change JVM they can simply change their parser. However this is very painful for the few of us that actually try to maintain tools that work across all versions and support a variety of flag collector and flag combinations. As you can probably imagine, that this rounding error exists means that it needs to be compensated for in the tooling for as long as these versions of the JVM are in play again.</font></div><div><font size="2"><br></font></div><div><font size="2">Kind regards,</font></div><div><font size="2">Kirk Pepperdine</font></div><div><div><br></div> <br><div><div>On Sep 12, 2014, at 9:23 AM, Thomas Schatzl <<a href="mailto:thomas.schatzl@oracle.com">thomas.schatzl@oracle.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<br><br>On Fri, 2014-09-12 at 00:12 +0200, Kirk Pepperdine wrote:<br><blockquote type="cite">Hi Thomas,<br><br>Thanks for this. I don’t see CR JDK-8058221 showing up so it’s difficult to comment. What you’ve mentioned is ok but I think it would be nice is the logs used the same formatting string.<br><br>BTW, my comment on reporting in bytes still stands.. it would eliminate the need for any formatting! Just print longs ;-)<br><br></blockquote><br>the bug is publicly available so I do not know why it is not accessible<br>for you.<br><br>Here's the description:<br><br>"In the gc, heap sizes are typically rounded to some (rather abritrary)<br>k/M/G values for better human consumption. <br><br>This introduces subtle rounding problems when calculating values from it<br>(like number of promoted bytes being negative for no reason) <br><br>Add an option to allow the size format output to always be written in<br>bytes. <br><br>This feature may also be automatically enabled by other options like<br>G1LogLevel=finest. "<br><br>Thanks,<br> Thomas<br><br><br></blockquote></div><br></div></body></html>