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

Reorder check_item_type diagnostics so they occur next to the corresponding check_well_formed diagnostics #117213

Merged
merged 3 commits into from
Jan 5, 2024

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Oct 26, 2023

The first commit is just a cleanup.

The second commit moves most checks from check_mod_item_types into check_well_formed, invoking the checks in lockstep per-item instead of iterating over all items twice.

@rustbot
Copy link
Collaborator

rustbot commented Oct 26, 2023

r? @wesleywiser

(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. labels Oct 26, 2023
@oli-obk oli-obk changed the title Refactor check_item_type to work on LocalDefId instead of ItemId Reorder check_item_type diagnostics so they occur next to the corresponding check_well_formed diagnostics Oct 26, 2023
@oli-obk
Copy link
Contributor Author

oli-obk commented Oct 26, 2023

I don't expect a perf effect, but technically some incremental cache dep graph could be affected

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

bors commented Oct 26, 2023

⌛ Trying commit 3cd5671 with merge 9eac8ba...

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 26, 2023
…try>

 Reorder check_item_type diagnostics so they occur next to the corresponding `check_well_formed` diagnostics

The first commit is just a cleanup.

The second commit moves most checks from `check_mod_item_types` into `check_well_formed`, invoking the checks in lockstep per-item instead of iterating over all items twice.
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Oct 26, 2023

💔 Test failed - checks-actions

@bors bors 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 Oct 26, 2023
@rustbot rustbot added the A-rustdoc-json Area: Rustdoc JSON backend label Oct 26, 2023
@oli-obk
Copy link
Contributor Author

oli-obk commented Oct 26, 2023

cc @rust-lang/rustdoc I had to revert some of #97842, as that only works if we avoid some sanity checks. We'll need to figure out a new way to get whatever was desired by that PR (though my changes did not affect any test output I think?)

@oli-obk
Copy link
Contributor Author

oli-obk commented Oct 26, 2023

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Oct 26, 2023

⌛ Trying commit e1ec23b with merge df89a22...

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 26, 2023
…try>

 Reorder check_item_type diagnostics so they occur next to the corresponding `check_well_formed` diagnostics

The first commit is just a cleanup.

The second commit moves most checks from `check_mod_item_types` into `check_well_formed`, invoking the checks in lockstep per-item instead of iterating over all items twice.
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member

cc @notriddle as you are the author of #97842.

@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

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

r=me

@notriddle
Copy link
Contributor

@GuillaumeGomez

If it's necessary to make other cleanups on the compiler, reverting #97842 is acceptable. I'll make a follow-up PR to accomplish the same thing in a different way.

@GuillaumeGomez
Copy link
Member

I'm not against it but you're the person who worked on it so just wanted you to be aware of it. :)

@rustbot
Copy link
Collaborator

rustbot commented Oct 27, 2023

Some changes occurred in GUI tests.

cc @GuillaumeGomez

@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 3, 2024

The 1.4% regression must be noise, it is purely in codegen, and this PR does not affect codegen.

The other regressions are real, either in incremental cache loading or in wf-check. Surprising, so I'll dig into those.

@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 3, 2024

The regression is because we actually need to do some work when ensureing a query:

1,854,992  ???:<rustc_query_system::dep_graph::graph::DepGraphData<rustc_middle::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  597,830  ???:_rjem_je_arena_cache_bin_fill_small
 -473,102  /build/glibc-wuryBv/glibc-2.31/string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:__memcpy_avx_unaligned_erms
  309,010  ???:do_rallocx
  277,039  ???:_rjem_je_arena_ralloc
  269,328  ???:_rjem_je_malloc_default
  224,251  ???:rustc_middle::ty::codec::encode_with_shorthand::<rustc_middle::query::on_disk_cache::CacheEncoder, rustc_middle::ty::Ty, <rustc_middle::query::on_disk_cache::CacheEncoder as rustc_type_ir::codec::TyEncoder>::type_shorthands>
  198,054  ???:_rjem_je_arena_ralloc_no_move
   94,215  ???:_rjem_je_tcache_alloc_small_hard
   91,732  /build/glibc-wuryBv/glibc-2.31/nptl/../nptl/pthread_mutex_trylock.c:pthread_mutex_trylock
   85,620  ???:_rjem_je_tcache_bin_flush_stashed
  -72,143  ???:rustc_query_impl::plumbing::encode_query_results::<rustc_query_impl::query_impl::typeck::QueryType>::{closure

@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 3, 2024

@bors r=estebank

@bors
Copy link
Contributor

bors commented Jan 3, 2024

📌 Commit 5b13dc7 has been approved by estebank

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jan 3, 2024

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 3, 2024
@bors
Copy link
Contributor

bors commented Jan 4, 2024

⌛ Testing commit 5b13dc7 with merge 627ca93...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 4, 2024
…stebank

 Reorder check_item_type diagnostics so they occur next to the corresponding `check_well_formed` diagnostics

The first commit is just a cleanup.

The second commit moves most checks from `check_mod_item_types` into `check_well_formed`, invoking the checks in lockstep per-item instead of iterating over all items twice.
@bors
Copy link
Contributor

bors commented Jan 4, 2024

💥 Test timed out

@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 Jan 4, 2024
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 4, 2024

@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 Jan 4, 2024
@bors
Copy link
Contributor

bors commented Jan 5, 2024

⌛ Testing commit 5b13dc7 with merge 791a53f...

@bors
Copy link
Contributor

bors commented Jan 5, 2024

☀️ Test successful - checks-actions
Approved by: estebank
Pushing 791a53f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 5, 2024
@bors bors merged commit 791a53f into rust-lang:master Jan 5, 2024
12 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 5, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (791a53f): 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.2% [0.2%, 0.4%] 7
Regressions ❌
(secondary)
0.8% [0.2%, 2.3%] 5
Improvements ✅
(primary)
-0.3% [-0.3%, -0.3%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [-0.3%, 0.4%] 9

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.1% [1.2%, 4.7%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.4% [-4.3%, -0.4%] 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)
- - 0
Improvements ✅
(secondary)
-2.9% [-2.9%, -2.9%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 670.353s -> 669.247s (-0.16%)
Artifact size: 311.08 MiB -> 311.06 MiB (-0.01%)

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

None yet

10 participants