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

rustc_privacy: Cleanups and perf improvements to EmbargoVisitor #111260

Merged
merged 4 commits into from
May 24, 2023

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented May 5, 2023

Continuation of #110907.

@rustbot
Copy link
Collaborator

rustbot commented May 5, 2023

r? @cjgillot

(rustbot has picked a reviewer for you, use r? to override)

@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 May 5, 2023
@rustbot
Copy link
Collaborator

rustbot commented May 5, 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

@petrochenkov
Copy link
Contributor Author

@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 5, 2023
@bors
Copy link
Contributor

bors commented May 5, 2023

⌛ Trying commit 0b306c0a1237abe3e973da1c8d43ba3369d90787 with merge d914dabd2ea6c514f585a1dd0fddc5e243671b99...

@petrochenkov petrochenkov added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 5, 2023
@petrochenkov
Copy link
Contributor Author

cc @Bryanskiy

@bors
Copy link
Contributor

bors commented May 5, 2023

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

@rust-timer

This comment has been minimized.

hir::ItemKind::Macro(ref macro_def, _) => {
self.update_reachability_from_macro(item.owner_id.def_id, macro_def);
}
hir::ItemKind::ForeignMod { items, .. } => {
for foreign_item in items {
self.update(foreign_item.id.owner_id.def_id, item_ev, Level::Reachable);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why isn't this update needed any more?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It wasn't needed previously either, both nominal and effective visibilities are meaningless for extern { ... } items themselves, and they are not added to the table - https://github.com/rust-lang/rust/blob/master/tests/ui/privacy/effective_visibilities.rs#L10

compiler/rustc_privacy/src/lib.rs Outdated Show resolved Hide resolved
@rust-timer

This comment was marked as outdated.

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels May 5, 2023
@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-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels May 6, 2023
@petrochenkov
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 8, 2023
@petrochenkov
Copy link
Contributor Author

#110907 is being reverted in #111371 due to regressions, so marking this as blocked again.

@petrochenkov petrochenkov added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 9, 2023
…rate`

Previously it had some logic requiring tree visiting, but it was moved to resolve last year.
in cases where they are guaranteed to be `Some`
and remove some more `Option`s as a result
@petrochenkov
Copy link
Contributor Author

@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 22, 2023
@bors
Copy link
Contributor

bors commented May 22, 2023

⌛ Trying commit edf95b5 with merge cd3488f3d7a500f374e0e7c1e2381f87e77be444...

@bors
Copy link
Contributor

bors commented May 22, 2023

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

1 similar comment
@bors
Copy link
Contributor

bors commented May 22, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cd3488f3d7a500f374e0e7c1e2381f87e77be444): comparison URL.

Overall result: ❌✅ regressions and improvements - 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
Regressions ❌
(secondary)
0.4% [0.3%, 0.7%] 9
Improvements ✅
(primary)
-0.5% [-1.3%, -0.1%] 50
Improvements ✅
(secondary)
-0.5% [-1.1%, -0.1%] 10
All ❌✅ (primary) -0.5% [-1.3%, -0.1%] 50

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)
3.0% [3.0%, 3.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.3% [-3.7%, -0.8%] 2
All ❌✅ (primary) - - 0

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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.3% [-6.5%, -1.1%] 39
Improvements ✅
(secondary)
-3.6% [-3.6%, -3.5%] 2
All ❌✅ (primary) -2.3% [-6.5%, -1.1%] 39

Binary size

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

Bootstrap: 643.403s -> 643.705s (0.05%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 22, 2023
@petrochenkov
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 22, 2023
@cjgillot
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented May 24, 2023

📌 Commit edf95b5 has been approved by cjgillot

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 May 24, 2023
@bors
Copy link
Contributor

bors commented May 24, 2023

⌛ Testing commit edf95b5 with merge c373194...

@bors
Copy link
Contributor

bors commented May 24, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing c373194 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 24, 2023
@bors bors merged commit c373194 into rust-lang:master May 24, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 24, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c373194): comparison URL.

Overall result: ❌✅ regressions and improvements - 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
Regressions ❌
(secondary)
0.4% [0.3%, 0.6%] 9
Improvements ✅
(primary)
-0.4% [-1.3%, -0.1%] 67
Improvements ✅
(secondary)
-0.4% [-0.6%, -0.2%] 15
All ❌✅ (primary) -0.4% [-1.3%, -0.1%] 67

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)
1.9% [1.3%, 2.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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

Binary size

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

Bootstrap: 647.059s -> 647.009s (-0.01%)

@nnethercote
Copy link
Contributor

The improvement here greatly outweigh the regressions. Nice results!

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label May 25, 2023
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.

6 participants