Skip to content

Conversation

@jlittle-ptc
Copy link
Contributor

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.

@dsgrieve
Copy link
Contributor

dsgrieve commented May 1, 2025

@kcpeppe - I'm thinking we want to handle this is a consistent way across all collectors. We had the notion of using the diarizer to know whether the log didn't have enough detail. We discussed this in the (somewhat stale) PR #409

@jlittle-ptc
Copy link
Contributor Author

I was debating taking a stab at #336 and implementing something like that where the diary would contain information about the Java Flags used from the command line if present (pre-unified) or what we can infer from unified logs during the diarizing process. I was thinking of adding a key/value map for storing this information rather than exclusively using flags as is currently done.

Unfortunately, my priorities are going to be shifting for a bit, so I'm not certain if I can get to it in the near term. But if you have some thoughts, I'm all ears.

@karianna
Copy link
Member

@jlittle-ptc apologies for not pushing on this earlier. We did merge another major refactor of the ZGC parser etc, so I'm afraid this will need a rebase.

@jlittle-ptc
Copy link
Contributor Author

Hopefully I'll have some time this week to review the changes. There's a possibility that I might withdraw this PR and create a new one.

@jlittle-ptc
Copy link
Contributor Author

Updated and posted a new PR #448. Closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants