Skip to content
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

Testing: Correct perf parsing of C++ output #632

Merged
merged 1 commit into from
May 15, 2024

Conversation

marshallward
Copy link
Member

This patch fixes errors in the parser of perf output. Previously, each record was assumed to be separated by spaces, but this failed for more generic records (usually from C++) which included signatures (such as f(a, b)) or templates (f<a, b>). Nested constructed were also possible.

This is fixed by introducing a simple tokenizer which extracts <, (, and whitespace from the output , then rebuilds the records by combining any whitespace which appears inside of delimiters.

This patch should hopefully resolve the CI errors in GitHub Actions.

@marshallward
Copy link
Member Author

Sorry about all the crashes, there were several failed cut-and-pastes from the prototype script. Everything appears to be working now. (...?) 😰

This patch fixes errors in the parser of perf output.  Previously,
each record was assumed to be separated by spaces, but this failed for
more generic records (usually from C++) which included signatures (such
as `f(a, b)`) or templates (`f<a, b>`).  Nested constructs were also
possible.

This is fixed by introducing a simple tokenizer which extracts <, (, and
whitespace from the output , then rebuilds the records by combining any
whitespace which appears inside of delimiters.

This patch should hopefully resolve the CI errors in GitHub Actions.
@adcroft adcroft merged commit 6272bbc into NOAA-GFDL:dev/gfdl May 15, 2024
12 checks passed
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.

2 participants