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

interpret: always enable write_immediate sanity checks #131006

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

RalfJung
Copy link
Member

Writing a wrongly-sized scalar somewhere can have quite confusing effects. Let's see how expensive it is to catch this early.

@rustbot
Copy link
Collaborator

rustbot commented Sep 29, 2024

r? @cjgillot

rustbot has assigned @cjgillot.
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 Sep 29, 2024
@rustbot
Copy link
Collaborator

rustbot commented Sep 29, 2024

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

@RalfJung
Copy link
Member 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 Sep 29, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 29, 2024
interpret: always enable write_immediate sanity checks

Writing a wrongly-sized scalar somewhere can have quite confusing effects. Let's see how expensive it is to catch this early.
@bors
Copy link
Contributor

bors commented Sep 29, 2024

⌛ Trying commit fe181de with merge e81d217...

@bors
Copy link
Contributor

bors commented Sep 29, 2024

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

@rust-timer

This comment has been minimized.

@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 Sep 29, 2024
@RalfJung
Copy link
Member Author

Let's try changing only one of them...

@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 Sep 29, 2024
@bors
Copy link
Contributor

bors commented Sep 29, 2024

⌛ Trying commit 7f48538 with merge c93cba0...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 29, 2024
interpret: always enable write_immediate sanity checks

Writing a wrongly-sized scalar somewhere can have quite confusing effects. Let's see how expensive it is to catch this early.
@bors
Copy link
Contributor

bors commented Sep 29, 2024

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

@rust-timer

This comment has been minimized.

@rust-timer

This comment was marked as outdated.

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 29, 2024
@RalfJung
Copy link
Member Author

Seems like that one is actually the more expensive one.

@RalfJung
Copy link
Member Author

Let's see if this other way of checking the "critical" path works.

@bors try
@rust-timer queue

@rust-timer

This comment has been minimized.

@rust-timer

This comment was marked as outdated.

@RalfJung RalfJung force-pushed the immediate-sanity branch 2 times, most recently from c060451 to 7caf2cd Compare September 29, 2024 20:06
@RalfJung
Copy link
Member Author

Well, seems like this is all we get.

@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 Sep 29, 2024
@bors
Copy link
Contributor

bors commented Sep 29, 2024

⌛ Trying commit 7caf2cd with merge b4d7387...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 29, 2024
interpret: always enable write_immediate sanity checks

Writing a wrongly-sized scalar somewhere can have quite confusing effects. Let's see how expensive it is to catch this early.
@bors
Copy link
Contributor

bors commented Sep 29, 2024

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b4d7387): 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
Regressions ❌
(secondary)
0.4% [0.2%, 0.7%] 15
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 2.9%, secondary 4.2%)

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.9% [1.2%, 4.7%] 2
Regressions ❌
(secondary)
4.2% [4.2%, 4.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.9% [1.2%, 4.7%] 2

Cycles

Results (secondary -3.0%)

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

Binary size

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

Bootstrap: 768.244s -> 769.825s (0.21%)
Artifact size: 341.41 MiB -> 341.34 MiB (-0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 29, 2024
@RalfJung
Copy link
Member Author

These are fairly small regressions, and only in secondary benchmarks, so maybe that's okay?

@saethlin
Copy link
Member

saethlin commented Sep 30, 2024

I think the overhead is acceptable for some better checks.

@RalfJung
Copy link
Member Author

RalfJung commented Oct 2, 2024

@saethlin is that an "r=me"?

@saethlin
Copy link
Member

saethlin commented Oct 2, 2024

It was not, because I hadn't looked at the diff. But I have now!

@bors r=saethlin

@bors
Copy link
Contributor

bors commented Oct 2, 2024

📌 Commit 7caf2cd has been approved by saethlin

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 Oct 2, 2024
@bors
Copy link
Contributor

bors commented Oct 2, 2024

⌛ Testing commit 7caf2cd with merge 9c7013c...

@bors
Copy link
Contributor

bors commented Oct 3, 2024

☀️ Test successful - checks-actions
Approved by: saethlin
Pushing 9c7013c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 3, 2024
@bors bors merged commit 9c7013c into rust-lang:master Oct 3, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 3, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9c7013c): 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.5% [0.2%, 2.3%] 15
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary -0.9%)

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

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: 771.411s -> 772.337s (0.12%)
Artifact size: 341.87 MiB -> 341.90 MiB (0.01%)

@RalfJung RalfJung deleted the immediate-sanity branch October 3, 2024 06:24
@rylev
Copy link
Member

rylev commented Oct 9, 2024

The perf regressions were deemed acceptable here.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Oct 9, 2024
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants