Skip to content

Revert #133418 (Store coverage source regions as Span) due to regression #133606 #133608

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

Zalathar
Copy link
Contributor

This reverts commit adf9b5f, reversing changes made to af1ca15.

Reverting #133418 due to regressions reported at #133606.

r? jieyouxu

This reverts commit adf9b5f, reversing
changes made to af1ca15.

Reverting due to <rust-lang#133606>.
@Zalathar Zalathar added the A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) label Nov 29, 2024
@rustbot rustbot added 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 Nov 29, 2024
@rustbot
Copy link
Collaborator

rustbot commented Nov 29, 2024

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@Zalathar
Copy link
Contributor Author

@bors p=1 rollup=always

Once this passes PR CI, I might just self-approve as suggested on Forge.

@jieyouxu
Copy link
Member

jieyouxu commented Nov 29, 2024

You can r=me anyways since I looked at it 😄

@Zalathar
Copy link
Contributor Author

🟩

@bors r=jieyouxu

@bors
Copy link
Collaborator

bors commented Nov 29, 2024

📌 Commit 9461f42 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 29, 2024
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 29, 2024
Revert rust-lang#133418 (Store coverage source regions as `Span`) due to regression rust-lang#133606

This reverts commit adf9b5f, reversing changes made to af1ca15.

Reverting rust-lang#133418 due to regressions reported at rust-lang#133606.

r? jieyouxu
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 29, 2024
Rollup of 7 pull requests

Successful merges:

 - rust-lang#131323 (Support `clobber_abi` in AVR inline assembly)
 - rust-lang#133092 (Always set the deployment target when building std)
 - rust-lang#133134 (Don't use a SyntheticProvider for literally every type)
 - rust-lang#133538 (Better diagnostic for fn items in variadic functions)
 - rust-lang#133590 (Rename `-Zparse-only`)
 - rust-lang#133592 (Misc: better instructions for envrc, ignore `/build` instead of `build/`)
 - rust-lang#133608 (Revert rust-lang#133418 (Store coverage source regions as `Span`) due to regression rust-lang#133606)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented Nov 29, 2024

⌛ Testing commit 9461f42 with merge cb2bd2b...

@bors
Copy link
Collaborator

bors commented Nov 29, 2024

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing cb2bd2b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 29, 2024
@bors bors merged commit cb2bd2b into rust-lang:master Nov 29, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Nov 29, 2024
@Zalathar Zalathar deleted the spans-revert branch November 29, 2024 08:38
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cb2bd2b): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -1.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.0% [-1.0%, -1.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.0% [-1.0%, -1.0%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 773.667s -> 773.306s (-0.05%)
Artifact size: 331.97 MiB -> 331.98 MiB (0.00%)

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 19, 2024
coverage: Store coverage source regions as `Span` until codegen (take 2)

This is an attempt to re-land rust-lang#133418:

> Historically, coverage spans were converted into line/column coordinates during the MIR instrumentation pass.

> This PR moves that conversion step into codegen, so that coverage spans spend most of their time stored as Span instead.

> In addition to being conceptually nicer, this also reduces the size of coverage mappings in MIR, because Span is smaller than 4x u32.

That PR was reverted by rust-lang#133608, because in some circumstances not covered by our test suite we were emitting coverage metadata that was causing `llvm-cov` to exit with an error (rust-lang#133606).

---

The implementation here is *mostly* the same, but adapted for subsequent changes in the relevant code (e.g. rust-lang#134163).

I believe that the changes in rust-lang#134163 should be sufficient to prevent the problem that required the original PR to be reverted. But I haven't been able to reproduce the original breakage in a regression test, and the `llvm-cov` error message is extremely unhelpful, so I can't completely rule out the possibility of this breaking again.

r? jieyouxu (reviewer of the original PR)
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 20, 2024
Rollup merge of rust-lang#134497 - Zalathar:spans, r=jieyouxu

coverage: Store coverage source regions as `Span` until codegen (take 2)

This is an attempt to re-land rust-lang#133418:

> Historically, coverage spans were converted into line/column coordinates during the MIR instrumentation pass.

> This PR moves that conversion step into codegen, so that coverage spans spend most of their time stored as Span instead.

> In addition to being conceptually nicer, this also reduces the size of coverage mappings in MIR, because Span is smaller than 4x u32.

That PR was reverted by rust-lang#133608, because in some circumstances not covered by our test suite we were emitting coverage metadata that was causing `llvm-cov` to exit with an error (rust-lang#133606).

---

The implementation here is *mostly* the same, but adapted for subsequent changes in the relevant code (e.g. rust-lang#134163).

I believe that the changes in rust-lang#134163 should be sufficient to prevent the problem that required the original PR to be reverted. But I haven't been able to reproduce the original breakage in a regression test, and the `llvm-cov` error message is extremely unhelpful, so I can't completely rule out the possibility of this breaking again.

r? jieyouxu (reviewer of the original PR)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants