Skip to content
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

Populate effective visibilities in 'rustc_privacy' #110907

Merged
merged 1 commit into from May 6, 2023

Conversation

Bryanskiy
Copy link
Contributor

Next part of RFC #48054.

r? @petrochenkov

@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 27, 2023
@rustbot
Copy link
Collaborator

rustbot commented Apr 27, 2023

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rust-log-analyzer

This comment has been minimized.

@bors

This comment was marked as resolved.

compiler/rustc_middle/src/middle/privacy.rs Outdated Show resolved Hide resolved
compiler/rustc_middle/src/middle/privacy.rs Outdated Show resolved Hide resolved
compiler/rustc_middle/src/middle/privacy.rs Outdated Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Outdated Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Outdated Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Outdated Show resolved Hide resolved
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 28, 2023
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Bryanskiy
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 2, 2023
compiler/rustc_privacy/src/lib.rs Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Outdated Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Outdated Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Outdated Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Outdated Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Outdated Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Outdated Show resolved Hide resolved
compiler/rustc_privacy/src/lib.rs Outdated Show resolved Hide resolved
compiler/rustc_middle/src/middle/privacy.rs Outdated Show resolved Hide resolved
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 2, 2023
@petrochenkov
Copy link
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 May 2, 2023
@bors
Copy link
Contributor

bors commented May 2, 2023

⌛ Trying commit 2dde54e6fd723b4e4c394184d4317aa3152eabd7 with merge 5e51bd5d58485b696cc9637960f1b3a0542f2f6d...

@bors
Copy link
Contributor

bors commented May 2, 2023

☀️ Try build successful - checks-actions
Build commit: 5e51bd5d58485b696cc9637960f1b3a0542f2f6d (5e51bd5d58485b696cc9637960f1b3a0542f2f6d)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5e51bd5d58485b696cc9637960f1b3a0542f2f6d): comparison URL.

Overall result: ❌ regressions - 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.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

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

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.5% [0.2%, 1.5%] 43
Regressions ❌
(secondary)
0.9% [0.2%, 2.5%] 16
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [0.2%, 1.5%] 43

Max RSS (memory usage)

Results

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)
2.6% [2.4%, 2.8%] 3
Improvements ✅
(primary)
-3.4% [-3.4%, -3.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.4% [-3.4%, -3.4%] 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: 656.873s -> 657.124s (0.04%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels May 2, 2023
@bors
Copy link
Contributor

bors commented May 6, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 6, 2023
@petrochenkov
Copy link
Contributor

We'll also be able to work on microoptimizations later, similarly to #102026.

#111260 pretty much compensates regressions from this PR.

@petrochenkov
Copy link
Contributor

The job x86_64-mingw-1 failed!

Let's check whether it's spurious.
I did test this PR locally, including this test, and didn't observe any issues.
@bors retry

@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 May 6, 2023
@Mark-Simulacrum Mark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label May 6, 2023
@bors
Copy link
Contributor

bors commented May 6, 2023

⌛ Testing commit cff85f2 with merge 31a4f2d...

@bors
Copy link
Contributor

bors commented May 6, 2023

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 31a4f2d to master...

1 similar comment
@bors
Copy link
Contributor

bors commented May 6, 2023

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 31a4f2d to master...

@bors bors added merged-by-bors This PR was explicitly merged by bors. labels May 6, 2023
@bors bors merged commit 31a4f2d into rust-lang:master May 6, 2023
12 checks passed
@rustbot rustbot added this to the 1.71.0 milestone May 6, 2023
@@ -310,6 +310,7 @@ where
/// Real logic of both `Flatten` and `FlatMap` which simply delegate to
/// this type.
#[derive(Clone, Debug)]
#[unstable(feature = "trusted_len", issue = "37572")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Unexpected to see it there

Copy link
Contributor

Choose a reason for hiding this comment

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

From what I see FlattenCompat is in a where clause of a public item, so it's considered leaked (reachable).
Requirements for stability attributes are pretty conservative, they are required on reachable items even if they are not nameable (exported).

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (31a4f2d): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.5% [0.2%, 1.6%] 72
Regressions ❌
(secondary)
0.5% [0.2%, 1.2%] 15
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [0.2%, 1.6%] 72

Max RSS (memory usage)

Results

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)
3.0% [3.0%, 3.0%] 1
Regressions ❌
(secondary)
2.2% [2.2%, 2.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.0% [3.0%, 3.0%] 1

Cycles

Results

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

Binary size

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

Bootstrap: 653.763s -> 653.481s (-0.04%)

@Manishearth
Copy link
Member

This regressed missing_debug_implementations: #111359

(and likely has regressed other things)

bors added a commit to rust-lang-ci/rust that referenced this pull request May 9, 2023
…rochenkov

Revert "Populate effective visibilities in `rustc_privacy`"

This reverts commit cff85f2, cc rust-lang#110907. It needs to be fixed, but there are too many issues being reported that I wanted to put up a revert until a proper fix can be committed.

Fixes a ton of issues where private but still reachable impls were missing during codegen:
Fixes rust-lang#111320
Fixes rust-lang#111321
Fixes rust-lang#111334
Fixes rust-lang#111357
Fixes rust-lang#111368
Fixes rust-lang#111373
Fixes rust-lang#111377
Fixes rust-lang#111386
Fixes rust-lang#111387

`@bors` p=1

r? `@petrochenkov`
bors added a commit to rust-lang-ci/rust that referenced this pull request May 14, 2023
Populate effective visibilities in `rustc_privacy` (take 2)

Same as rust-lang#110907 + regressions fixes.
Fixes rust-lang#111359.

r? `@petrochenkov`
RalfJung pushed a commit to RalfJung/miri that referenced this pull request May 16, 2023
Populate effective visibilities in `rustc_privacy` (take 2)

Same as rust-lang/rust#110907 + regressions fixes.
Fixes rust-lang/rust#111359.

r? `@petrochenkov`
bors added a commit to rust-lang-ci/rust that referenced this pull request May 24, 2023
rustc_privacy: Cleanups and perf improvements to `EmbargoVisitor`

Continuation of rust-lang#110907.
saethlin pushed a commit to saethlin/miri that referenced this pull request May 26, 2023
rustc_privacy: Cleanups and perf improvements to `EmbargoVisitor`

Continuation of rust-lang/rust#110907.
thomcc pushed a commit to tcdi/postgrestd that referenced this pull request Jul 18, 2023
Populate effective visibilities in `rustc_privacy` (take 2)

Same as rust-lang/rust#110907 + regressions fixes.
Fixes rust-lang/rust#111359.

r? `@petrochenkov`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants