Change LLVM BOLT flags by Kobzol · Pull Request #114141 · rust-lang/rust · GitHu...
source link: https://github.com/rust-lang/rust/pull/114141
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Change LLVM BOLT flags #114141
Conversation
Contributor
I talked to the BOLT maintainers about the binary size effect of BOLT. Currently, BOLTing LLVM increases its binary size from ~120 MiB to ~170 MiB, which is not ideal. Now we can track both runtime performance and (rustc, LLVM, ...) artifact sizes in perf.RLO, so I'd like to try experimenting with changing the flags to reduce libLLVM.so
size without regressing the performance gains of BOLT too much.
r? @ghost
added 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)
labels
Contributor
Author
This comment has been minimized.
added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label
Contributor
Try build successful - checks-actions |
This comment has been minimized.
Outdated
// Try to reuse old text segments to reduce binary size |
||
.arg("--use-old-text") |
||
.arg("--lite=0") |
||
.arg("--no-huge-pages") |
I assume the huge page alignment just adds padding, so it should compress fine and not affect download sizes and also shouldn't affect the amount of stuff that gets loaded into memory.
Contributor
Author
I'm not actually sure what this does, as it seems to be undocumented. I'll try without it.
Collaborator
Finished benchmarking commit (b734abf): comparison URL. Overall result: regressions and improvements - no action neededBenchmarking 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 Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 654.227s -> 655.834s (0.25%) |
removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label
Contributor
Author
Okay, pretty much no regressions and -50 MiB of LLVM size. Pretty nice. I'll try next what happens with just |
Contributor
Author
@bors try @rust-timer queue Trying just |
This comment has been minimized.
added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label
Contributor
Try build successful - checks-actions |
This comment has been minimized.
Collaborator
Finished benchmarking commit (b5ad006): comparison URL. Overall result: improvements - no action neededBenchmarking 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 Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 651.183s -> 650.167s (-0.16%) |
removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label
Contributor
Author
Ok, looks like adding this flag doesn't regress perf and saves 50 MiB of libLLVM size. That looks nice. r? bootstrap |
Member
@bors r+ |
removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label
added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label
Contributor
Author
BOLT can be tricky, so let's make sure that this is easier to revert if some issuea crop up. @bors rollup=never |
Contributor
☀️ Test successful - checks-actions |
Collaborator
Finished benchmarking commit (f45961b): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results CyclesResults Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 652.022s -> 653.409s (0.21%) |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Successfully merging this pull request may close these issues.
None yet
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK