Skip to content

Fix for gctoolkit #352 (Generational Heap Parser fails to recognize parallel gc lines)#362

Merged
karianna merged 2 commits intomicrosoft:mainfrom
jlittle-ptc:gctoolkit-352
Jun 23, 2024
Merged

Fix for gctoolkit #352 (Generational Heap Parser fails to recognize parallel gc lines)#362
karianna merged 2 commits intomicrosoft:mainfrom
jlittle-ptc:gctoolkit-352

Conversation

@jlittle-ptc
Copy link
Contributor

The bug was caused by mismatched indices in the regex that matches a Parallel collection. The indices of two methods (YoungGen and Failure) in GenerationalHeapParser have been updated to correctly match the expected index so that the lines no longer generate a "not implemented" error in debug mode.

I also reviewed the test suite to determine why this issue wasn't caught, and found that there was no test case that explicitly tested the parsing of Parallel GC lines, so I've added an additional test case for PSYoungGen that fails before the changes, and passes afterwards.

I was unable to add a similar test case for Failure using the current strategy of parse and check for events as the failure line appears to be ignored.

There is a chance that further fixes are required for less-frequently logged lines, but for any sample data I have available, the files now parse successfully.

@jlittle-ptc
Copy link
Contributor Author

jlittle-ptc commented Jun 11, 2024

@microsoft-github-policy-service agree company="PTC"

@karianna karianna requested a review from kcpeppe June 12, 2024 22:32
Copy link
Member

@karianna karianna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - just @kcpeppe to review

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