Skip to content

Support "presence" mode in coverage instrumentation#158415

Open
woodruffw wants to merge 2 commits into
rust-lang:mainfrom
woodruffw-forks:ww/sbc
Open

Support "presence" mode in coverage instrumentation#158415
woodruffw wants to merge 2 commits into
rust-lang:mainfrom
woodruffw-forks:ww/sbc

Conversation

@woodruffw

@woodruffw woodruffw commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

MCP: rust-lang/compiler-team#1002

Tracker: #158408

This adds a new unstable variant of -C instrument-coverage, namely -C instrument-coverage=presence. "Presence" instrumentation is what LLVM calls "single-byte counter" coverage, although the latter is arguably misleading because it's really a 1-bit coverage mode that just happens to use bytes as the coverage map representation.

Separately, this PR adds a new alias, -C instrument-coverage=counter, which is equivalent to the current bare form of -C instrument-coverage (or -C instrument-coverage=yes).

Notes/TODOs:

  • Move the documentation changes out of this PR and into rustc-dev-guide.

Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
@rustbot

rustbot commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in coverage instrumentation.

cc @Zalathar

Some changes occurred in coverage tests.

cc @Zalathar

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

rustc-dev-guide is developed in its own repository. If possible, consider making this change to rust-lang/rustc-dev-guide instead.

cc @BoxyUwU, @tshepang

Some changes occurred in coverage instrumentation.

cc @Zalathar

Some changes occurred in coverage instrumentation.

cc @Zalathar

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustc-dev-guide Area: rustc-dev-guide S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 25, 2026
@rustbot

rustbot commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

r? @oli-obk

rustbot has assigned @oli-obk.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 18 candidates

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  PR_CI_JOB: 1
  IMAGE: pr-check-2
##[endgroup]
    Updating crates.io index
error: failed to get `icu_normalizer` as a dependency of package `idna_adapter v1.2.0`
    ... which satisfies dependency `idna_adapter = "^1"` of package `idna v1.0.3`
    ... which satisfies dependency `idna = "^1.0"` of package `cookie_store v0.21.1`
    ... which satisfies dependency `cookie_store = "^0.21.1"` of package `ureq v3.0.8`
    ... which satisfies dependency `ureq = "^3"` of package `citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)`

Caused by:
  failed to load source for dependency `icu_normalizer`

Caused by:
  unable to update registry `crates-io`

Caused by:
  download of ic/u_/icu_normalizer failed

Caused by:
  curl failed

Caused by:

@woodruffw

Copy link
Copy Markdown
Contributor Author

CI failure here appears to be the known HTTP/2 flake fixed with rust-lang/cargo#16903

@oli-obk oli-obk assigned Zalathar and jackh726 and unassigned oli-obk Jun 26, 2026
@rust-bors

rust-bors Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #158593) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustc-dev-guide Area: rustc-dev-guide S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants