gctoolkit icon indicating copy to clipboard operation
gctoolkit copied to clipboard

Fix for Legacy ZGC log files without details (-Xlog:gc)

Open jlittle-ptc opened this issue 6 months ago • 2 comments
trafficstars

zgc-noGen-java21-noDetail.log

Small log sample attached from Java 21 without +ZGenerational and using -Xlog:gc rather than -Xlog:gc* (detailed)

ZGCParser was unable to parse the events from this log as there is only one line logged per event, and thus, no "cycle start" that would generate the forwardReference. This is not an issue for Generational, as two lines are logged for each event, so the special case only applies to Full/Garbage type ZGC events.

Fixed this issue and added test cases for both Generational and non-generational lines without details to ZGCParserTest.

Also took the opportunity to update deprecated .getTimeStamp() calls to .toSeconds() in ZGCParserTest.

jlittle-ptc avatar Apr 30 '25 13:04 jlittle-ptc