-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression in code coverage (-Zprofile
) at some point after nightly-2021-11-11
#100125
Comments
@apiraino I've spent a few hours yesterday, and that's my result:
Notes:
Case 1 and Case 2 above shows, that the newer |
You can help narrow down the regression even more by using |
Regression in 936eba3
I actually bisected between 2021-11-11 and 2022-08-09. |
@fanninpm By the way, you could probably change labels on this issue :) |
Can I? @rustbot label -E-needs-bisection Nevertheless, it would be helpful to have a Minimal, Complete, and Verifiable Example. |
Steps:
Explanation: if |
A Minimal, Complete, and Verifiable Example: https://github.com/fadeevab/rust-lang-rust-issues-100125 |
@fanninpm Could "regression-untriaged" be removed? |
I've tried spending a bit of time on the differences between grcov reports, I'm unsure how to provide a clear actionable to act on for this behaviour. I checked the grcov issue tracker and found mozilla/grcov#725 which seems close to what is reported here. That issue lead to #91661 which has more insights and suggestions to help forming a diagnose. For this reason I'd leave this issue marked as in need of some more accurate triaging than I can provide. |
I can reproduce this with librsvg. Both with grcov 0.8.11:
(I'm using -Zprofile because -Cinstrument-coverage produces incorrect results when linking to C code) |
Problem: `zeroize` bumped the MSRV to 1.60, it makes 2021 nightly incompatible. However, the newest `rustc` versions have a profile coverage regression: rust-lang/rust#100125 To keep a positive coverage >84%: - ignore comment sections - ignore `src/error.rs`
…ukang Remove support for `-Zprofile` (gcov-style coverage instrumentation) Tracking issue: rust-lang#42524 MCP: rust-lang/compiler-team#798 --- This PR removes the unstable `-Zprofile` flag, which enables ”gcov-style” coverage instrumentation, along with its associated `-Zprofile-emit` configuration flag. (The profile flag predates and is almost entirely separate from the stable `-Cinstrument-coverage` flag.) Notably, the `-Zprofile` flag: - Is largely untested in-tree, having only one run-make test that does not check whether its output is correct or useful. - Has no known maintainer. - Has seen no push towards stabilization. - Has at least one severe regression reported in 2022 that apparently remains unaddressed. - rust-lang#100125 - Is confusingly named, since it appears to be more about coverage than performance profiling, and has nothing to do with PGO. - Is fundamentally limited by relying on counters auto-inserted by LLVM, with no knowledge of Rust beyond debuginfo.
…ukang Remove support for `-Zprofile` (gcov-style coverage instrumentation) Tracking issue: rust-lang#42524 MCP: rust-lang/compiler-team#798 --- This PR removes the unstable `-Zprofile` flag, which enables ”gcov-style” coverage instrumentation, along with its associated `-Zprofile-emit` configuration flag. (The profile flag predates and is almost entirely separate from the stable `-Cinstrument-coverage` flag.) Notably, the `-Zprofile` flag: - Is largely untested in-tree, having only one run-make test that does not check whether its output is correct or useful. - Has no known maintainer. - Has seen no push towards stabilization. - Has at least one severe regression reported in 2022 that apparently remains unaddressed. - rust-lang#100125 - Is confusingly named, since it appears to be more about coverage than performance profiling, and has nothing to do with PGO. - Is fundamentally limited by relying on counters auto-inserted by LLVM, with no knowledge of Rust beyond debuginfo.
…ukang Remove support for `-Zprofile` (gcov-style coverage instrumentation) Tracking issue: rust-lang#42524 MCP: rust-lang/compiler-team#798 --- This PR removes the unstable `-Zprofile` flag, which enables ”gcov-style” coverage instrumentation, along with its associated `-Zprofile-emit` configuration flag. (The profile flag predates and is almost entirely separate from the stable `-Cinstrument-coverage` flag.) Notably, the `-Zprofile` flag: - Is largely untested in-tree, having only one run-make test that does not check whether its output is correct or useful. - Has no known maintainer. - Has seen no push towards stabilization. - Has at least one severe regression reported in 2022 that apparently remains unaddressed. - rust-lang#100125 - Is confusingly named, since it appears to be more about coverage than performance profiling, and has nothing to do with PGO. - Is fundamentally limited by relying on counters auto-inserted by LLVM, with no knowledge of Rust beyond debuginfo.
Rollup merge of rust-lang#131829 - Zalathar:goodbye-zprofile, r=chenyukang Remove support for `-Zprofile` (gcov-style coverage instrumentation) Tracking issue: rust-lang#42524 MCP: rust-lang/compiler-team#798 --- This PR removes the unstable `-Zprofile` flag, which enables ”gcov-style” coverage instrumentation, along with its associated `-Zprofile-emit` configuration flag. (The profile flag predates and is almost entirely separate from the stable `-Cinstrument-coverage` flag.) Notably, the `-Zprofile` flag: - Is largely untested in-tree, having only one run-make test that does not check whether its output is correct or useful. - Has no known maintainer. - Has seen no push towards stabilization. - Has at least one severe regression reported in 2022 that apparently remains unaddressed. - rust-lang#100125 - Is confusingly named, since it appears to be more about coverage than performance profiling, and has nothing to do with PGO. - Is fundamentally limited by relying on counters auto-inserted by LLVM, with no knowledge of Rust beyond debuginfo.
Triage: closing because |
No body, no crime 😁 For the reference, here is what can be used instead of |
TL;DR:
Older nightly toolchain gives an expected code coverage:
rustup default nightly-2021-11-11
UPDATE: Regression is reproduced below #100125 (comment)
Prerequisites
I have a GitHub workflow which generates a code coverage report with nightly toolchain +
grcov
, then sending it to https://coveralls.io.I expected to see 100% code coverage on a simple file, e.g. see older coverage result: https://coveralls.io/builds/43003664/source?filename=src%2Ferror.rs -
error.rs
has 100% code coverage.Instead, this happened:
Version it worked on
At least nightly-2021-11-11 toolchain works:
However, I have not narrowed down the most recent version this worked on.
Version with regression
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: