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

Use CS PGO for LLVM #111806

Closed
wants to merge 5 commits into from
Closed

Use CS PGO for LLVM #111806

wants to merge 5 commits into from

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented May 20, 2023

Revival of #97153. I want to try how it behaves now, with CS IR instrumentation mode.

r? @ghost

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels May 20, 2023
@Kobzol
Copy link
Contributor Author

Kobzol commented May 20, 2023

@bors try

@bors
Copy link
Collaborator

bors commented May 20, 2023

⌛ Trying commit 8fb3161 with merge 0a75e5fcd9e451d84f9810109a6ac60257e49322...

@bors
Copy link
Collaborator

bors commented May 21, 2023

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

@Kobzol
Copy link
Contributor Author

Kobzol commented May 21, 2023

@rust-timer build 0a75e5fcd9e451d84f9810109a6ac60257e49322

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0a75e5fcd9e451d84f9810109a6ac60257e49322): 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)
9.9% [0.3%, 22.5%] 116
Regressions ❌
(secondary)
7.9% [0.3%, 22.5%] 85
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 9.9% [0.3%, 22.5%] 116

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)
3.1% [2.4%, 4.3%] 4
Regressions ❌
(secondary)
1.1% [1.1%, 1.1%] 3
Improvements ✅
(primary)
-1.9% [-3.2%, -0.9%] 9
Improvements ✅
(secondary)
-2.3% [-3.4%, -1.1%] 22
All ❌✅ (primary) -0.4% [-3.2%, 4.3%] 13

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)
7.5% [1.1%, 12.4%] 86
Regressions ❌
(secondary)
6.8% [1.1%, 13.3%] 65
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 7.5% [1.1%, 12.4%] 86

Binary size

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

Bootstrap: 642.813s -> 707.353s (10.04%)

@rustbot rustbot added the perf-regression Performance regression. label May 22, 2023
@Kobzol
Copy link
Contributor Author

Kobzol commented May 22, 2023

@bors try

@bors
Copy link
Collaborator

bors commented May 22, 2023

⌛ Trying commit 71c2376 with merge e1b0e5eae0e9416ffbd8cb434eb32756de11d563...

@bors
Copy link
Collaborator

bors commented May 22, 2023

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

@Kobzol
Copy link
Contributor Author

Kobzol commented May 22, 2023

@rust-timer build e1b0e5eae0e9416ffbd8cb434eb32756de11d563

@rust-timer

This comment has been minimized.

@Kobzol
Copy link
Contributor Author

Kobzol commented May 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 May 22, 2023
@bors
Copy link
Collaborator

bors commented May 22, 2023

⌛ Trying commit 282dec1 with merge 69dea58a6c752143682fb9231f2398ed11df566d...

@bors
Copy link
Collaborator

bors commented May 22, 2023

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

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e1b0e5eae0e9416ffbd8cb434eb32756de11d563): 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)
10.0% [0.4%, 22.7%] 114
Regressions ❌
(secondary)
7.5% [0.3%, 22.3%] 89
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 10.0% [0.4%, 22.7%] 114

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.9% [2.0%, 3.9%] 4
Regressions ❌
(secondary)
1.1% [1.1%, 1.1%] 3
Improvements ✅
(primary)
-1.7% [-3.1%, -1.0%] 6
Improvements ✅
(secondary)
-2.5% [-4.2%, -0.8%] 18
All ❌✅ (primary) 0.1% [-3.1%, 3.9%] 10

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)
7.8% [1.1%, 12.6%] 83
Regressions ❌
(secondary)
7.1% [1.2%, 13.2%] 60
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 7.8% [1.1%, 12.6%] 83

Binary size

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

Bootstrap: 643.403s -> 707.811s (10.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 23, 2023
@Kobzol
Copy link
Contributor Author

Kobzol commented May 23, 2023

@rust-timer build 69dea58a6c752143682fb9231f2398ed11df566d

@rust-log-analyzer

This comment has been minimized.

@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 May 23, 2023
@Kobzol
Copy link
Contributor Author

Kobzol commented May 23, 2023

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 23, 2023

⌛ Trying commit bac84d35c3b30b4f595cbfa2ad65d0e4fa7e40cf with merge 0ca9584f6f65865e868c62b1274dd67b1bde930c...

@bors
Copy link
Collaborator

bors commented May 23, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0ca9584f6f65865e868c62b1274dd67b1bde930c): comparison URL.

Overall result: ❌ regressions - 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)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
0.3% [0.2%, 0.3%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.1% [1.1%, 1.1%] 1

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.1%, 2.8%] 4
Improvements ✅
(primary)
-0.9% [-0.9%, -0.9%] 1
Improvements ✅
(secondary)
-2.5% [-3.1%, -2.1%] 3
All ❌✅ (primary) -0.9% [-0.9%, -0.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.8% [2.5%, 3.0%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 644.363s -> 643.206s (-0.18%)

@rustbot rustbot removed S-waiting-on-perf Status: Waiting on a perf run to be completed. perf-regression Performance regression. labels May 23, 2023
@Kobzol
Copy link
Contributor Author

Kobzol commented May 23, 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 May 23, 2023
@bors
Copy link
Collaborator

bors commented May 23, 2023

⌛ Trying commit 21d4c2d with merge f88803760f77562ed93ee33f27a94bb5d54bc88a...

@bors
Copy link
Collaborator

bors commented May 23, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f88803760f77562ed93ee33f27a94bb5d54bc88a): 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.8% [0.2%, 1.7%] 44
Regressions ❌
(secondary)
0.9% [0.4%, 1.4%] 19
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) 0.8% [0.2%, 1.7%] 44

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)
- - 0
Improvements ✅
(secondary)
-2.0% [-3.0%, -1.1%] 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)
1.6% [0.7%, 2.2%] 20
Regressions ❌
(secondary)
2.5% [1.9%, 3.1%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.6% [0.7%, 2.2%] 20

Binary size

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

Bootstrap: 646.753s -> 650.26s (0.54%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels May 23, 2023
@zamazan4ik
Copy link
Contributor

@Kobzol Am I right that according to the testing above, CS PGO does not bring additional performance improvement for Rustc compared to the "usual" PGO?

@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 15, 2023

It's weird, since it seems to gain improvements for others that are doing it (Google), and we use it for LLVM, not for rustc, where it is also supposed to provide benefits. There were a few perf. runs where it was a win (on an older PR), but I can't manage to reproduce it.

@Kobzol
Copy link
Contributor Author

Kobzol commented Jul 10, 2023

It seems that CSIR PGO is just not worth it if BOLT is also used (https://aaupov.github.io/blog/2023/07/09/pgo). Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc perf-regression Performance regression. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure 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