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

simplify layout calculations in rawvec #107167

Merged
merged 1 commit into from
Feb 11, 2023

Conversation

the8472
Copy link
Member

@the8472 the8472 commented Jan 21, 2023

The use of Layout::array was introduced in #83706 which lead to a perf regression.

This PR basically reverts that change since rust currently only supports stride == size types, but to be on the safe side it leaves a const-assert there to make sure this gets caught if those assumptions ever change.

@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 Jan 21, 2023
@the8472
Copy link
Member Author

the8472 commented Jan 21, 2023

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

bors commented Jan 21, 2023

⌛ Trying commit 291a9680f195b370dc3c560a62cc8423465c743f with merge 5613aa692046f5fb9ebeddd5510baca85b56e5bb...

@bors
Copy link
Contributor

bors commented Jan 21, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5613aa692046f5fb9ebeddd5510baca85b56e5bb): 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.3% [0.2%, 0.4%] 35
Regressions ❌
(secondary)
0.5% [0.2%, 3.6%] 16
Improvements ✅
(primary)
-0.4% [-0.8%, -0.2%] 5
Improvements ✅
(secondary)
-0.7% [-1.3%, -0.3%] 10
All ❌✅ (primary) 0.2% [-0.8%, 0.4%] 40

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)
- - 0
Improvements ✅
(primary)
-1.9% [-1.9%, -1.9%] 1
Improvements ✅
(secondary)
-3.6% [-4.6%, -2.6%] 2
All ❌✅ (primary) -1.9% [-1.9%, -1.9%] 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)
- - 0
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.4% [-1.4%, -1.4%] 1
All ❌✅ (primary) - - 0

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jan 22, 2023
@the8472
Copy link
Member Author

the8472 commented Jan 22, 2023

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

bors commented Jan 22, 2023

⌛ Trying commit a27b3474ed6727423d1a6ed8e9724ed15ded87a7 with merge 3c1f86b6ba4eb0c6d1d29b6cdd1f475c605dbc5d...

@bors
Copy link
Contributor

bors commented Jan 22, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3c1f86b6ba4eb0c6d1d29b6cdd1f475c605dbc5d): comparison URL.

Overall result: ✅ improvements - 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 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
Improvements ✅
(primary)
-0.5% [-0.9%, -0.3%] 12
Improvements ✅
(secondary)
-0.9% [-1.2%, -0.7%] 10
All ❌✅ (primary) -0.5% [-0.9%, -0.3%] 12

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)
1.8% [1.1%, 2.5%] 2
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.4%, -2.1%] 2
All ❌✅ (primary) 1.8% [1.1%, 2.5%] 2

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)
4.7% [1.0%, 8.9%] 11
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.2% [-1.4%, -1.0%] 4
Improvements ✅
(secondary)
-1.6% [-1.7%, -1.5%] 3
All ❌✅ (primary) 3.2% [-1.4%, 8.9%] 15

@rustbot rustbot removed S-waiting-on-perf Status: Waiting on a perf run to be completed. perf-regression Performance regression. labels Jan 22, 2023
@the8472
Copy link
Member Author

the8472 commented Jan 22, 2023

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

bors commented Jan 22, 2023

⌛ Trying commit 7c3da9ae62a73d5460b9ca59eb04fdf581313737 with merge be7d0536f688ba266e7d2d3e9ad9dd2223e7f2a2...

@bors
Copy link
Contributor

bors commented Jan 22, 2023

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

@bors bors added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 9, 2023
@rust-log-analyzer
Copy link
Collaborator

The job i686-msvc-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test fs::tests::read_large_dir ... ok

failures:

---- fs::tests::create_dir_all_with_junctions stdout ----
thread 'fs::tests::create_dir_all_with_junctions' panicked at 'symlink_junction(&target, &junction) failed with: The data present in the reparse point buffer is invalid. (os error 4392)', library\std\src\fs\tests.rs:1381:5
---- fs::tests::recursive_rmdir stdout ----
---- fs::tests::recursive_rmdir stdout ----
thread 'fs::tests::recursive_rmdir' panicked at 'symlink_junction(&d2, &dt.join("d2")) failed with: The data present in the reparse point buffer is invalid. (os error 4392)', library\std\src\fs\tests.rs:583:5
---- fs::tests::recursive_rmdir_of_symlink stdout ----
---- fs::tests::recursive_rmdir_of_symlink stdout ----
thread 'fs::tests::recursive_rmdir_of_symlink' panicked at 'symlink_junction(&dir, &link) failed with: The data present in the reparse point buffer is invalid. (os error 4392)', library\std\src\fs\tests.rs:600:5

failures:
    fs::tests::create_dir_all_with_junctions
    fs::tests::recursive_rmdir
    fs::tests::recursive_rmdir
    fs::tests::recursive_rmdir_of_symlink

test result: FAILED. 923 passed; 3 failed; 4 ignored; 0 measured; 0 filtered out; finished in 73.75s

error: test failed, to rerun pass `-p std --lib`
Build completed successfully in 0:39:35
make: *** [Makefile:68: ci-subset-1] Error 1

@ChrisDenton
Copy link
Member

ChrisDenton commented Feb 10, 2023

Hm, I've seen that failure before. At first glance it looks kinda like some kind of miscomputation in symlink_junction_inner (i.e. the buffer is not getting written to correctly). But I may be wrong (it's not a great function and only used in tests).

In any case, I don't think it has anything to do with the changes in this PR.

@the8472
Copy link
Member Author

the8472 commented Feb 10, 2023

retrying per comment above

@bors r=thomcc rollup=iffy

@bors
Copy link
Contributor

bors commented Feb 10, 2023

💡 This pull request was already approved, no need to approve it again.

  • This pull request previously failed. You should add more commits to fix the bug, or use retry to trigger a build again.
  • There's another pull request that is currently being tested, blocking this pull request: Rollup of 6 pull requests #107870

@bors
Copy link
Contributor

bors commented Feb 10, 2023

📌 Commit 6fcf175 has been approved by thomcc

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

bors commented Feb 10, 2023

⌛ Testing commit 6fcf175 with merge 54b261ab13fc0fa54a048a3bfac3524b76530ce1...

@bors
Copy link
Contributor

bors commented Feb 10, 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 Feb 10, 2023
@ChrisDenton
Copy link
Member

I opened the above issue to look in to this. I can reproduce on master without this PR so I'm still fairly confident this is not the cause. Although it does seem to be triggering CI for some reason.

@rust-log-analyzer
Copy link
Collaborator

The job i686-msvc-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test fs::tests::read_large_dir ... ok

failures:

---- fs::tests::create_dir_all_with_junctions stdout ----
thread 'fs::tests::create_dir_all_with_junctions' panicked at 'symlink_junction(&target, &junction) failed with: The data present in the reparse point buffer is invalid. (os error 4392)', library\std\src\fs\tests.rs:1381:5
---- fs::tests::recursive_rmdir_of_symlink stdout ----
---- fs::tests::recursive_rmdir_of_symlink stdout ----
thread 'fs::tests::recursive_rmdir_of_symlink' panicked at 'symlink_junction(&dir, &link) failed with: The data present in the reparse point buffer is invalid. (os error 4392)', library\std\src\fs\tests.rs:600:5
---- fs::tests::recursive_rmdir stdout ----
---- fs::tests::recursive_rmdir stdout ----
thread 'fs::tests::recursive_rmdir' panicked at 'symlink_junction(&d2, &dt.join("d2")) failed with: The data present in the reparse point buffer is invalid. (os error 4392)', library\std\src\fs\tests.rs:583:5

failures:
    fs::tests::create_dir_all_with_junctions
    fs::tests::recursive_rmdir
    fs::tests::recursive_rmdir
    fs::tests::recursive_rmdir_of_symlink

test result: FAILED. 923 passed; 3 failed; 4 ignored; 0 measured; 0 filtered out; finished in 15.36s

error: test failed, to rerun pass `-p std --lib`
Build completed unsuccessfully in 0:39:35
make: *** [Makefile:68: ci-subset-1] Error 1

@ChrisDenton
Copy link
Member

@bors retry the issue was hopefully fixed by #107900

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

bors commented Feb 11, 2023

⌛ Testing commit 6fcf175 with merge 8dabf5d...

@bors
Copy link
Contributor

bors commented Feb 11, 2023

☀️ Test successful - checks-actions
Approved by: thomcc
Pushing 8dabf5d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 11, 2023
@bors bors merged commit 8dabf5d into rust-lang:master Feb 11, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 11, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8dabf5d): 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.3% [0.3%, 0.3%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.4% [-0.7%, -0.2%] 11
Improvements ✅
(secondary)
-0.6% [-1.4%, -0.2%] 9
All ❌✅ (primary) -0.3% [-0.7%, 0.3%] 13

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)
2.3% [2.2%, 2.5%] 2
Regressions ❌
(secondary)
2.4% [1.9%, 3.3%] 3
Improvements ✅
(primary)
-0.9% [-0.9%, -0.9%] 1
Improvements ✅
(secondary)
-3.6% [-3.6%, -3.6%] 1
All ❌✅ (primary) 1.3% [-0.9%, 2.5%] 3

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

@rustbot rustbot added the perf-regression Performance regression. label Feb 11, 2023
@nnethercote
Copy link
Contributor

Improvements greatly exceed regressions here.

@rustbot label: +perf-regression-triaged

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

9 participants