Skip to content

coverage: Deal with unused functions and their names in one place #138766

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

Merged
merged 2 commits into from
Apr 7, 2025

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Mar 21, 2025

When coverage codegen creates dummy instances and covfun records for unused functions, we already know that they are unused, so we might as well set up the special array of unused function names at the same time.


The first commit only moves code around; all significant changes are in the second commit.

There should be no change in compiler output.

@Zalathar Zalathar added the A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) label Mar 21, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 21, 2025

r? @estebank

rustbot has assigned @estebank.
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 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 Mar 21, 2025
@Zalathar
Copy link
Contributor Author

Zalathar commented Apr 6, 2025

Rerolling due to reviewer inactivity:

r? compiler

@rustbot rustbot assigned SparrowLii and unassigned estebank Apr 6, 2025
Copy link
Member

@SparrowLii SparrowLii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM since this simplify the code and doesn't change the output(covfun_records and name_globals)

@SparrowLii
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 7, 2025

📌 Commit b3c40cf has been approved by SparrowLii

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 Apr 7, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Apr 7, 2025
coverage: Deal with unused functions and their names in one place

When coverage codegen creates dummy instances and covfun records for unused functions, we already know that they are unused, so we might as well set up the special array of unused function names at the same time.

---

The first commit only moves code around; all significant changes are in the second commit.

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

Successful merges:

 - rust-lang#138314 (fix usage of `autodiff` macro with inner functions)
 - rust-lang#138766 (coverage: Deal with unused functions and their names in one place)
 - rust-lang#139298 (Allow for missing invisible close delim when reparsing an expression.)
 - rust-lang#139426 (Make the UnifyKey and UnifyValue imports non-nightly)

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

bors commented Apr 7, 2025

⌛ Testing commit b3c40cf with merge b9856b6...

@bors
Copy link
Collaborator

bors commented Apr 7, 2025

☀️ Test successful - checks-actions
Approved by: SparrowLii
Pushing b9856b6 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 7, 2025
@bors bors merged commit b9856b6 into rust-lang:master Apr 7, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 7, 2025
Copy link

github-actions bot commented Apr 7, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 25a615b (parent) -> b9856b6 (this PR)

Test differences

No test diffs found

Job duration changes

  1. x86_64-apple-1: 6596.6s -> 10324.6s (56.5%)
  2. dist-apple-various: 6220.7s -> 8985.8s (44.4%)
  3. dist-aarch64-apple: 4502.2s -> 5271.8s (17.1%)
  4. dist-x86_64-illumos: 5733.2s -> 5990.5s (4.5%)
  5. dist-various-1: 4435.9s -> 4592.0s (3.5%)
  6. x86_64-msvc-2: 6713.4s -> 6912.2s (3.0%)
  7. x86_64-gnu-llvm-19-1: 5329.4s -> 5469.9s (2.6%)
  8. armhf-gnu: 4402.2s -> 4514.8s (2.6%)
  9. i686-gnu-1: 8435.5s -> 8649.7s (2.5%)
  10. mingw-check: 1266.7s -> 1298.5s (2.5%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@Zalathar Zalathar deleted the unused-fn branch April 7, 2025 07:03
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b9856b6): 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)

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

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: 779.04s -> 778.587s (-0.06%)
Artifact size: 365.93 MiB -> 365.96 MiB (0.01%)

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) 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.

6 participants