Remove support for -Zprofile (gcov-style coverage instrumentation) by Zalathar · Pull Request #131829 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation15 Commits1 Checks6 Files changed

Conversation

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

[ Show hidden characters]({{ revealButtonHref }})

Zalathar

Tracking issue: #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:

@rustbot

r? @chenyukang

rustbot has assigned @chenyukang.
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

@rustbot rustbot added A-run-make

Area: port run-make Makefiles to rmake.rs

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

Oct 17, 2024

@rustbot

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

@Zalathar

@jieyouxu jieyouxu added S-waiting-on-MCP

Status: PR has a compiler MCP and is waiting for the compiler MCP to complete.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Oct 17, 2024

@Zalathar

@Zalathar

@chenyukang

@bors

📌 Commit ce3e14a has been approved by chenyukang

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 1, 2024

@jieyouxu

Technically this is unstable flag, but should this get compat relnotes still?

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Nov 1, 2024

@matthiaskrgr

…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:

@Zalathar

Given the flag’s age and former importance (?), a mention in relnotes is probably warranted. I’ll try to come up with a suggested wording.

@jieyouxu

@rustbot rustbot added the relnotes

Marks issues that should be documented in the release notes of the next release.

label

Nov 1, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Nov 1, 2024

@bors

…iaskrgr

Rollup of 6 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

jieyouxu added a commit to jieyouxu/rust that referenced this pull request

Nov 1, 2024

@jieyouxu

…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:

bors added a commit to rust-lang-ci/rust that referenced this pull request

Nov 1, 2024

@bors

Rollup of 13 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

@sylvestre

@Zalathar While not perfect, -Zprofile had advantages over the other option.
Since this change, we haven't been able to get coverage working on again on a medium size rust project:
uutils/coreutils#6857
(the size of the profraw files is way too large for Github).

Am I missing something? If not, would it be possible to reconsider this removal ? Thanks :)

@marco-c

Agreed with @sylvestre, there are many users, and some large projects might have difficulties switching to source-based coverage as it can be more resource intensive.
If there are no considerable benefits stemming from its removal, it would be ideal to keep it even with its limitations.

@workingjubilee

My understanding is that the "limitations" are coverage info that can be incorrect by a factor greater than 10, right? It's based on debuginfo, but either not in a way that seems to be very accurate for Rust code, or we are emitting debuginfo in a way that is not useful for it, right?

Minoru added a commit to newsboat/newsboat that referenced this pull request

Nov 17, 2024

@Minoru

We used to rely on -Zprofile, but it was recently removed from Rust Nightly: rust-lang/rust#131829 This commit switches to a stable alternative; cf. mozilla/grcov#1240

This change is accompanied by a change in the build environment: instead of using Clang 18 with Rust Nightly, we now use Clang 18 with Rust 1.81. That's the last Rust version based on LLVM 18. Previously we tried to match LLVM versions between C++ and Rust to avoid weird coverage results. Now, it's required to match them, otherwise no coverage is gathered at all.

Fixes #2912.

@Zalathar

If there are no considerable benefits stemming from its removal, it would be ideal to keep it even with its limitations.

Unfortunately, the existing code was causing real maintenance problems in other parts of the compiler, which was one of the reasons for removing it.

@jieyouxu

@workingjubilee

It would also be nice if someone reported to LLVM about the storage usage being excessive. I feel it is doubtful they have done any optimizations on the profdata format's space usage.

elcoosp added a commit to elcoosp/scrpr that referenced this pull request

Nov 23, 2024

@elcoosp

rwestphal added a commit to holo-routing/holo that referenced this pull request

Nov 25, 2024

@rwestphal

The rustc's -Zprofile compiler flag was removed on nightly [1], which means gcov-style coverage instrumentation is no longer possible.

[1] rust-lang/rust#131829

Signed-off-by: Renato Westphal renato@opensourcerouting.org

rwestphal added a commit to holo-routing/holo that referenced this pull request

Nov 25, 2024

@rwestphal

The rustc's -Zprofile compiler flag was removed on nightly [1], which means gcov-style coverage instrumentation is no longer possible.

[1] rust-lang/rust#131829

Signed-off-by: Renato Westphal renato@opensourcerouting.org

Grinkers added a commit to tiipotto/tii that referenced this pull request

Jan 18, 2025

@Grinkers

Grinkers added a commit to tiipotto/tii that referenced this pull request

Jan 18, 2025

@Grinkers

Grinkers added a commit to tiipotto/tii that referenced this pull request

Jan 18, 2025

@Grinkers

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request

Jan 22, 2025

@tmeijn

This MR contains the following updates:

Package Update Change
rust minor 1.83.0 -> 1.84.0

MR created with the help of el-capitano/tools/renovate-bot.

Proposed changes to behavior should be submitted there as MRs.


Release Notes

rust-lang/rust (rust)

v1.84.0

Compare Source

==========================

Language

Compiler

Libraries

Stabilized APIs

These APIs are now stable in const contexts

Cargo

Rustdoc

Compatibility Notes


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.



This MR has been generated by Renovate Bot.

mbehr1 added a commit to mbehr1/adlt that referenced this pull request

Feb 2, 2025

@mbehr1

mbehr1 added a commit to mbehr1/adlt that referenced this pull request

Feb 2, 2025

@mbehr1

wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request

Feb 2, 2025

@he32

Pkgsrc changes:

Upstream changes:

Version 1.84.1 (2025-01-30)

Version 1.84.0 (2025-01-09)

Language

Compiler

Libraries

Stabilized APIs

These APIs are now stable in const contexts

Cargo

Rustdoc

Compatibility Notes

cakebaker added a commit to cakebaker/findutils that referenced this pull request

Feb 7, 2025

@cakebaker

and use cargo-llvm-cov instead of grcov.

Support for -Zprofile has been removed from Rust nightly: rust-lang/rust#131829

Zalathar added a commit to dpaoliello/rust that referenced this pull request

Feb 13, 2025

@Zalathar

sylvestre pushed a commit to cakebaker/ansi-width that referenced this pull request

Feb 27, 2025

@cakebaker @sylvestre

GJKrupa added a commit to krupa-dev/manplan that referenced this pull request

Mar 16, 2025

@GJKrupa

Labels

A-run-make

Area: port run-make Makefiles to rmake.rs

relnotes

Marks issues that should be documented in the release notes of the next release.

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.