-
Notifications
You must be signed in to change notification settings - Fork 968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eden space summury in G1GC log might report values with decimal separators #53
Comments
Hi Stephan Looks like a new format of the detailed memory output in the latest jdk, According to my tests NumberParser is about three times faster than If you'd like to make these changes I'll happily wait for the pull request. Regards, Jörg |
Hi Jörg, Sorry for not getting back to you earlier. If you're not in too much of a hurry, I'd be happy to open a pull request in one of the coming days (quite busy at work :)). |
Hi Stephan I would like to release about by the end of this month. So "in the Regards, Jörg |
Hi Stephan I have just tested with the latest JDK (7u15) and I don't find decimal separators in the memory output of G1 there. Seeing your jdk version contains a "ea" (seems to be "early access") I wonder if this format is ever going to make it into the productive releases. Do you have any idea? Regards, Jörg |
Good catch. Unfortunately I don't know whether this was a fluke or a feature that just hasn't been released yet. The page listing Developer Preview Releases hasn't been updated since January 3 (at the time of writing), so that isn't much help either. I suggest we hold off on this merge until the format has been cleared up |
Hi Stephan Since the decimal separators haven't made it into JDK 7u17, I'll close this issue and the pull request. If in a later release we see this change, I'll know where to go look for the fix. Thank you anyway for your time! Regards, Jörg |
I think this is a future feature. If you look at the output of "java -version" you will see that the hotspot version in the developer preview is a later version than the hotspot in the latest release. With all of the security updates the version numbers have gotten screwed up. |
I recently had to parse some GC logs produced with JDK 1.7.0_12-ea-b08. Upon loading the file in GCViewer, a bunch of
NumberFormatException
s were reported. I tracked this down to the fact that the following format is currently not supported:After some debugging, I noticed that
DataReaderSun1_6_0G1#parseDetails
callsAbstractDataReaderSun#setMemoryExtended
which attempts to parse the values as integers usingNumberParser#parseInt
. Clearly that fails due to the presence of decimal separators. Also, inAbstractDataReaderSun#setMemoryExtended
thefor
-loop that determines the length of the post-memory number (line 140) assumes that all characters are digits (so not a dot).It'd be great if GCViewer would support this!
(Locally I added an ugly hack to
NumberParser#parseInt
in order work around these things (that was faster than generating a new GC log ;)), but these changes are not suitable for sharing. (If you really want me to I can paste them here, though...).)Semi-relatedly, I noticed that only one of the six methods in
NumberParser
is used. It might be worthwhile to determine how much of a speedup theNumberParser
provides over Java's built-in API. If the difference is not very significant, I'd drop that class entirely and simply fix this issue with some calls toString#substring
andDouble#parseDouble
instead. (And a small change toAbstractDataReaderSun#getMemoryInKiloByte
.) If you agree with that approach I'd be willing to make the changes and open a pull request.The text was updated successfully, but these errors were encountered: