Skip to content

coverage: Use a query to find counters/expressions that must be zero#134029

Merged
bors merged 4 commits into
rust-lang:masterfrom
Zalathar:zero
Dec 10, 2024
Merged

coverage: Use a query to find counters/expressions that must be zero#134029
bors merged 4 commits into
rust-lang:masterfrom
Zalathar:zero

Conversation

@Zalathar

@Zalathar Zalathar commented Dec 8, 2024

Copy link
Copy Markdown
Member

As of #133446, this query (coverage_ids_info) determines which counter/expression IDs are unused. So with only a little extra work, we can take the code that was using that information to determine which coverage counters/expressions must be zero, and move that inside the query as well.

There should be no change in compiler output.

This query (`coverage_ids_info`) already determines which counter/expression
IDs are unused, so it only takes a little extra effort to also determine which
counters/expressions must have a value of zero.
The information that was being collected by this builder type is now collected
by the `coverage_ids_info` query instead.
@Zalathar Zalathar added the A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) label Dec 8, 2024
@rustbot

rustbot commented Dec 8, 2024

Copy link
Copy Markdown
Collaborator

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
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 commented Dec 8, 2024

Copy link
Copy Markdown
Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@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 Dec 8, 2024
@compiler-errors

Copy link
Copy Markdown
Contributor

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 8, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 8, 2024
coverage: Use a query to find counters/expressions that must be zero

As of rust-lang#133446, this query (`coverage_ids_info`) determines which counter/expression IDs are unused. So with only a little extra work, we can take the code that was using that information to determine which coverage counters/expressions must be zero, and move that inside the query as well.

There should be no change in compiler output.
@bors

bors commented Dec 8, 2024

Copy link
Copy Markdown
Collaborator

⌛ Trying commit 3a35fb6 with merge 8432019...

@bors

bors commented Dec 8, 2024

Copy link
Copy Markdown
Collaborator

☀️ Try build successful - checks-actions
Build commit: 8432019 (843201938150983638edd0061bd5bfafb9b37126)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8432019): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (primary -3.4%, secondary -3.2%)

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)
-3.4% [-3.4%, -3.4%] 1
Improvements ✅
(secondary)
-3.2% [-3.2%, -3.2%] 1
All ❌✅ (primary) -3.4% [-3.4%, -3.4%] 1

Cycles

Results (secondary 4.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)
4.0% [4.0%, 4.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

Results (secondary 0.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.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Bootstrap: 767.853s -> 766.397s (-0.19%)
Artifact size: 330.92 MiB -> 330.81 MiB (-0.03%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 8, 2024
@oli-obk

oli-obk commented Dec 9, 2024

Copy link
Copy Markdown
Contributor

r? @oli-obk

bors r plus

@bors

bors commented Dec 9, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit 3a35fb6 has been approved by oli-obk

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 Dec 9, 2024
@Zalathar

Zalathar commented Dec 9, 2024

Copy link
Copy Markdown
Member Author

@bors rollup=maybe

We don't have benchmarks for coverage, so this isn't going to have any measurable perf impact.

fmease added a commit to fmease/rust that referenced this pull request Dec 9, 2024
coverage: Use a query to find counters/expressions that must be zero

As of rust-lang#133446, this query (`coverage_ids_info`) determines which counter/expression IDs are unused. So with only a little extra work, we can take the code that was using that information to determine which coverage counters/expressions must be zero, and move that inside the query as well.

There should be no change in compiler output.
fmease added a commit to fmease/rust that referenced this pull request Dec 9, 2024
coverage: Use a query to find counters/expressions that must be zero

As of rust-lang#133446, this query (`coverage_ids_info`) determines which counter/expression IDs are unused. So with only a little extra work, we can take the code that was using that information to determine which coverage counters/expressions must be zero, and move that inside the query as well.

There should be no change in compiler output.
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 10, 2024
Rollup of 10 pull requests

Successful merges:

 - rust-lang#131558 (Lint on combining `#[no_mangle]` and `#[export_name]`)
 - rust-lang#133122 (Add unpolished, experimental support for AFIDT (async fn in dyn trait))
 - rust-lang#133184 (wasi/fs: Improve stopping condition for <ReadDir as Iterator>::next)
 - rust-lang#133456 (Add licenses + Run `cargo update`)
 - rust-lang#133472 (Run TLS destructors for wasm32-wasip1-threads)
 - rust-lang#133853 (use vendor sources by default on dist tarballs)
 - rust-lang#133946 (coverage: Prefer to visit nodes whose predecessors have been visited)
 - rust-lang#134010 (fix ICE on type error in promoted)
 - rust-lang#134029 (coverage: Use a query to find counters/expressions that must be zero)
 - rust-lang#134071 (Configure renovatebot)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 10, 2024
Rollup of 10 pull requests

Successful merges:

 - rust-lang#131558 (Lint on combining `#[no_mangle]` and `#[export_name]`)
 - rust-lang#133184 (wasi/fs: Improve stopping condition for <ReadDir as Iterator>::next)
 - rust-lang#133456 (Add licenses + Run `cargo update`)
 - rust-lang#133472 (Run TLS destructors for wasm32-wasip1-threads)
 - rust-lang#133853 (use vendor sources by default on dist tarballs)
 - rust-lang#133946 (coverage: Prefer to visit nodes whose predecessors have been visited)
 - rust-lang#134010 (fix ICE on type error in promoted)
 - rust-lang#134029 (coverage: Use a query to find counters/expressions that must be zero)
 - rust-lang#134071 (Configure renovatebot)
 - rust-lang#134102 (Miscellaneous fixes for nix-dev-shell)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit bb8a206 into rust-lang:master Dec 10, 2024
@rustbot rustbot added this to the 1.85.0 milestone Dec 10, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 10, 2024
Rollup merge of rust-lang#134029 - Zalathar:zero, r=oli-obk

coverage: Use a query to find counters/expressions that must be zero

As of rust-lang#133446, this query (`coverage_ids_info`) determines which counter/expression IDs are unused. So with only a little extra work, we can take the code that was using that information to determine which coverage counters/expressions must be zero, and move that inside the query as well.

There should be no change in compiler output.
@Zalathar Zalathar deleted the zero branch December 10, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) 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.

7 participants