Skip to content

Apply OvO patch to fix line wrapping in compiler timing output#2223

Open
bhandarkar-pranav wants to merge 1 commit into
aomp-devfrom
amd/dev/bhandarkar-pranav/patch_ovo
Open

Apply OvO patch to fix line wrapping in compiler timing output#2223
bhandarkar-pranav wants to merge 1 commit into
aomp-devfrom
amd/dev/bhandarkar-pranav/patch_ovo

Conversation

@bhandarkar-pranav
Copy link
Copy Markdown
Contributor

@bhandarkar-pranav bhandarkar-pranav commented May 13, 2026

Motivation

This change implements automatic patching for the OvO test suite to prevent line wrapping in compiler timing output logs.

Technical Details

The patch sets a wide terminal width (COLUMNS=1000) both as an environment variable and explicitly in make commands to ensure compiler timing output is not wrapped, making logs more readable. More importantly, this allows --time-passes data to be properly analyzed by LLVMOptTimeVisualizer.py. For instance, this is what was happening

Line Wrapping Example
The -time-passes output format is:

 0.0000 (  0.0%)   0.0000 (  0.0%)   0.0000 (  0.0%)   0.0000 (  0.0%) 
OuterAnalysisManagerProxy<llvm::AnalysisManager<llvm::Module>, llvm::Function>

With PTY COLUMNS=80, that long line gets wrapped mid-timing-value:
What appeared in the log:

 0.0000 (  0.0%)   0.0000 (  0.0%)   0.0000 (  0.0%)   0.00
00 (  0.0%)  OuterAnalysisManagerProxy<llvm::AnalysisManager<llvm::Module>, llvm::Function>

The 4th timing value 0.0000 ( 0.0%) got split at column 80:

  • First line ends with: 0.00
  • Second line starts with: 00 ( 0.0%) PassName...

Result: The parser sees 0.00 on one line (invalid) and 00 ( 0.0%) on the next (also invalid).

Changes:

  • Add bin/patches/ovo.patch: Sets COLUMNS=1000 to prevent line wrapping
  • Update bin/patches/patch-control-file_23.0.txt: Add OvO patch entry
  • Modify bin/run_ovo.sh: Apply patch before test execution and remove after completion

This change implements automatic patching for the OvO test suite to
prevent line wrapping in compiler timing output logs.

Changes:
- Add bin/patches/ovo.patch: Sets COLUMNS=1000 to prevent line wrapping
- Update bin/patches/patch-control-file_23.0.txt: Add OvO patch entry
- Modify bin/run_ovo.sh: Apply patch before test execution and remove
  after completion

The patch sets a wide terminal width (COLUMNS=1000) both as an
environment variable and explicitly in make commands to ensure
compiler timing output is not wrapped, making logs more readable.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@dpalermo dpalermo left a comment

Choose a reason for hiding this comment

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

LGTM, but I think this should already be covered by your aomp-config-ctime.env patch that set COLUMNS=1000

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