Skip to content

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

Merged
adcroft merged 1 commit into
NOAA-GFDL:dev/gfdlfrom
marshallward:perf_parse_fix
May 15, 2024
Merged

Testing: Correct perf parsing of C++ output#632
adcroft merged 1 commit into
NOAA-GFDL:dev/gfdlfrom
marshallward:perf_parse_fix

Conversation

@marshallward
Copy link
Copy Markdown
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
Copy Markdown
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
@marshallward marshallward deleted the perf_parse_fix branch May 24, 2025 18:13
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