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: mark some hot functions inline(always) #130197

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Sep 10, 2024

That seems to recover a good part of the perf impact of #129778.

r? @saethlin

@rustbot
Copy link
Collaborator

rustbot commented Sep 10, 2024

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

@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 10, 2024
@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 10, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 10, 2024
experiment: see where the perf regressions in rust-lang#129778 come from

Let's see if we can figure out what caused the perf impact in rust-lang#129778.

There are some extra functions in a few places so maybe more `inline(always)` helps...

r? `@saethlin`
@bors
Copy link
Contributor

bors commented Sep 10, 2024

⌛ Trying commit 0852bf2 with merge a775fd6...

@bors
Copy link
Contributor

bors commented Sep 10, 2024

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a775fd6): 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
Improvements ✅
(secondary)
-2.1% [-2.3%, -1.9%] 6
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary -2.6%)

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.6% [-2.6%, -2.6%] 1
All ❌✅ (primary) - - 0

Cycles

Results (secondary -6.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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-6.9% [-8.8%, -3.9%] 4
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 755.942s -> 756.905s (0.13%)
Artifact size: 341.35 MiB -> 341.32 MiB (-0.01%)

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

That seems to be a good part of it, at least.

recovers some of the perf regressions from rust-lang#129778
@RalfJung RalfJung changed the title experiment: see where the perf regressions in #129778 come from interpret: mark some hot functions inline(always) Sep 10, 2024
@saethlin
Copy link
Member

I would really like to know why PGO+BOLT does the wrong thing here but the amount of perf on the table here isn't worth very much contributor time.

@bors r+

@bors
Copy link
Contributor

bors commented Sep 11, 2024

📌 Commit d104ded 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 Sep 11, 2024
@bors
Copy link
Contributor

bors commented Sep 11, 2024

⌛ Testing commit d104ded with merge 5bce6d4...

@bors
Copy link
Contributor

bors commented Sep 11, 2024

☀️ Test successful - checks-actions
Approved by: saethlin
Pushing 5bce6d4 to master...

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

Finished benchmarking commit (5bce6d4): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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
Improvements ✅
(secondary)
-1.7% [-2.3%, -0.4%] 8
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary 6.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)
6.0% [6.0%, 6.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 758.053s -> 756.954s (-0.14%)
Artifact size: 341.34 MiB -> 341.36 MiB (0.01%)

@RalfJung RalfJung deleted the interp-perf branch September 12, 2024 06:09
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. 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.

5 participants