bootstrap: add ./x run compiler-coverage for measuring rustc's own test suite coverage - #161172
Draft
akintewe wants to merge 1 commit into
Draft
bootstrap: add ./x run compiler-coverage for measuring rustc's own test suite coverage#161172akintewe wants to merge 1 commit into
./x run compiler-coverage for measuring rustc's own test suite coverage#161172akintewe wants to merge 1 commit into
Conversation
…test suite coverage
akintewe
force-pushed
the
coverage-upstream-squashed
branch
from
August 16, 2026 12:48
195fa24 to
31d67b9
Compare
Contributor
|
☔ The latest upstream changes (presumably #161196) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
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.
This is a draft PR for a
./x run compiler-coveragestep that measures how much of rustc's own source is exercised by its test suite (ui, incremental, run-make, and so on).It builds an instrumented rustc, runs the test suites against it, merges the resulting profile data, and produces an HTML report broken down by crate, file, and function, showing which parts of the compiler are and aren't covered.
LLM disclosure
I used an LLM which was Claude, via Claude Code throughout this project as a substantial collaborator, not just for cleanup or review. It wrote most of the CompilerCoverage bootstrap step, the profraw merging and callback logic in test.rs, and most of the coverage transform logic like monomorphization merging and closure inlining. It also found and fixed several real bugs like a profraw race condition, a stage instrumentation scoping bug, a stale profdata bug, and handled rebasing this branch onto current main and resolving conflicts.
I wrote the HTML report generation, its CSS, render.rs, and main.rs myself, along with part of transform.rs. I understand the code well enough to walk through and defend any part of it, and this disclosure is meant to reflect accurately where the LLM's contribution was substantial versus where the implementation was mine.