Fix DWARF line 0 handling and coz --version for cmake installs#269
Merged
emeryberger merged 2 commits intoplasma-umass:masterfrom Feb 23, 2026
Merged
Fix DWARF line 0 handling and coz --version for cmake installs#269emeryberger merged 2 commits intoplasma-umass:masterfrom
emeryberger merged 2 commits intoplasma-umass:masterfrom
Conversation
LLVM emits DWARF line 0 for code with no meaningful source attribution (prologues, drop glue, optimization artifacts), unlike GCC which attributes such code to the nearest real source line. Rather than adopting GCC's approach of assigning line 0 code to an adjacent line (which would inflate that line's apparent cost), we discard these entries by treating them like end_sequence — resetting prev_address so no address range is created. This loses ~2.6% of samples in tested Rust profiles but avoids both the misleading `:0` locations and experiment cycles wasted on unoptimizable code. No impact on GCC-compiled code which doesn't emit line 0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When installed via cmake, pyproject.toml was not installed alongside the coz script, so _read_version() could not find it. Install pyproject.toml to the existing data directory (share/coz/) and check that path as a fallback after the source-tree path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
coz --versionshowing "unknown" for cmake installs: The version lookup now searches multiple candidate paths forpyproject.toml(source tree and cmake install prefix undershare/coz/), and the cmake install step copiespyproject.tomlinto the data directory.Test plan
coz --versionshows the correct versionmake install) and verifycoz --versionstill works🤖 Generated with Claude Code