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

[perf] test MCP510 #113382

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

[perf] test MCP510 #113382

wants to merge 10 commits into from

Conversation

lqd
Copy link
Member

@lqd lqd commented Jul 5, 2023

r? @ghost

@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 Jul 5, 2023
@lqd
Copy link
Member Author

lqd commented Jul 5, 2023

Let's see if the bootstrapping cfgs are correctly set up.

@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 Jul 5, 2023
@bors
Copy link
Contributor

bors commented Jul 5, 2023

⌛ Trying commit 793c8e6 with merge 4cb98396e9dc17fbe9b0da2b1bd35d9b05fff30c...

@bors
Copy link
Contributor

bors commented Jul 5, 2023

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

1 similar comment
@bors

This comment was marked as duplicate.

@rust-timer

This comment has been minimized.

@lqd
Copy link
Member Author

lqd commented Jul 5, 2023

Let's see if the bootstrapping cfgs are correctly set up.

$  cargo +4cb98396e9dc17fbe9b0da2b1bd35d9b05fff30c build -q && readelf -p .comment ./target/debug/helloworld

String dump of section '.comment':
  [     0]  GCC: (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
  [    2d]  Linker: LLD 16.0.5

Looks like yes?

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4cb98396e9dc17fbe9b0da2b1bd35d9b05fff30c): 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

Warning ⚠: The following benchmark(s) failed to build:

  • rustc

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)
-34.1% [-74.8%, -0.6%] 31
Improvements ✅
(secondary)
-32.7% [-74.0%, -3.7%] 74
All ❌✅ (primary) -34.1% [-74.8%, -0.6%] 31

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)
27.8% [21.9%, 33.7%] 2
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 27.8% [21.9%, 33.7%] 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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-32.3% [-65.9%, -1.4%] 28
Improvements ✅
(secondary)
-28.4% [-64.8%, -3.3%] 73
All ❌✅ (primary) -32.3% [-65.9%, -1.4%] 28

Binary size

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.6%, 2.4%] 20
Regressions ❌
(secondary)
0.5% [0.4%, 1.1%] 61
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.4%, -0.1%] 2
All ❌✅ (primary) 1.6% [0.6%, 2.4%] 20

Bootstrap: missing data

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 5, 2023
@lqd
Copy link
Member Author

lqd commented Jul 18, 2023

The data gathering is done so I'll close this for now, but may reopen to rerun crater on these new try artifacts.

@lqd lqd closed this Jul 18, 2023
@lqd lqd reopened this Sep 12, 2023
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Sep 12, 2023
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment was marked as resolved.

@rust-log-analyzer

This comment was marked as outdated.

@rust-log-analyzer

This comment was marked as resolved.

@lqd
Copy link
Member Author

lqd commented Apr 18, 2024

Vanilla LLVM CI failing as expected 👌

@lqd
Copy link
Member Author

lqd commented Apr 20, 2024

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 20, 2024
@bors
Copy link
Contributor

bors commented Apr 20, 2024

⌛ Trying commit 3f4b4be with merge ea4f4e2...

@bors
Copy link
Contributor

bors commented Apr 20, 2024

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

lqd added 10 commits April 21, 2024 08:01
This is used to notify we want to use rust-lld as the default linker in
a target.
`x86_64-unknown-linux-gnu` has switched to using the self-contained linker
by default (unless asked not to), so we have to build rust-lld:
- when we build our own llvm
- when we use download-ci-llvm
- otherwise, when using an external llvm we can't enable it
the `rust.lld` config enables rustc's `CFG_USE_SELF_CONTAINED_LINKER` env var, and we:
- set the linker-flavor to use lld
- enable the self-contained linker

this makes the target use the rust-lld linker by default
the default value changes on `x86_64-unknown-linux-gnu`, and semantics kinda
as it will impact the target's default linker
@lqd
Copy link
Member Author

lqd commented Apr 21, 2024

@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 Apr 21, 2024
@bors
Copy link
Contributor

bors commented Apr 21, 2024

⌛ Trying commit 57ca57e with merge fcad06f...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 21, 2024
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-aux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Apr 21, 2024

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fcad06f): 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.3% [0.3%, 0.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-30.0% [-72.0%, -0.5%] 32
Improvements ✅
(secondary)
-26.4% [-71.3%, -1.6%] 73
All ❌✅ (primary) -29.1% [-72.0%, 0.3%] 33

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)
7.0% [1.3%, 23.4%] 7
Regressions ❌
(secondary)
2.9% [2.9%, 2.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.4% [-5.4%, -5.4%] 1
All ❌✅ (primary) 7.0% [1.3%, 23.4%] 7

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)
- - 0
Improvements ✅
(primary)
-26.9% [-62.5%, -0.6%] 31
Improvements ✅
(secondary)
-24.9% [-62.5%, -2.2%] 69
All ❌✅ (primary) -26.9% [-62.5%, -0.6%] 31

Binary size

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.1% [0.6%, 4.3%] 28
Regressions ❌
(secondary)
2.0% [0.5%, 5.3%] 74
Improvements ✅
(primary)
-0.2% [-0.3%, -0.1%] 4
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) 1.8% [-0.3%, 4.3%] 32

Bootstrap: 672.201s -> 661.733s (-1.56%)
Artifact size: 315.29 MiB -> 315.28 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 21, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 22, 2024
Enable `rust-lld` on nightly `x86_64-unknown-linux-gnu`

We believe we have done virtually all the internal work and tests we could to prepare for using `lld` as the default linker (at least on Linux). We're IMHO at a point where we'd need to expand testing and coverage in order to make progress on this effort.

Therefore, for further testing and gathering real-world feedback, unexpected issues and use-cases, this PR enables `rust-lld` as the default linker:
- on nightly only (and dev channel)
- on `x86_64-unknown-linux-gnu` only
- when not using an external LLVM (except `download-ci-llvm`), so that distros are not impacted

as described in more detail in this [zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Enabling.20.60rust-lld.60.20on.20nightly.20.60x86_64-unknown-linux-gnu.60/near/433709343).

In case any issues happen to users, as e.g. lld is not bug-for-bug compatible with GNU ld, it's easy to disable with `-Zlinker-features=-lld` to revert to using the system's default linker.

---

I don't know who should review this kind of things, as it's somewhat of a crosscutting effort. Compiler contributor, compiler performance WG and infra member sounds perfect, so r? `@Mark-Simulacrum.`

The last crater run encountered a low number (44) of mainly avoidable issues, like small incompatibilities, user errors, and a difference between the two linkers about which default to use with `--gc-sections`. [Here's the triage report](https://hackmd.io/OAJxlxc6Te6YUot9ftYSKQ?view), categorizing the issues, with some analyses and workarounds. I'd appreciate another set of eyes looking at these results.

The changes in this PR have been test-driven for CI changes, try builds with tests enabled, rustc-perf with bootstrapping, in PR rust-lang#113382.

For infra, about the CI change: this PR forces `rust.lld` to false on vanilla LLVM builders, just to make sure we have coverage without `rust-lld`. Though to be clear, just using an external LLVM is already enough to keep `rust.lld` to false, in turn reverting everything to using the system's default linker.

cc `@rust-lang/bootstrap` for the bootstrap and config change
cc `@petrochenkov` for the small compiler change
cc `@rust-lang/wg-compiler-performance`

Marking as temporarily blocked, as I think we'd want to publish a blog post announcing the change around the same time as we merge. It will also leave a bit of time for more feedback/concerns in the zulip thread.
`@rustbot` blocked

Bootstrap change history: this PR changes the default of a config option on `x86_64-unknown-linux-gnu`. It's, however, not expected to cause issues, or require any changes to existing configurations. It's a big enough change that people should at least know about it, in case it causes unexpected problems. If that happens, set `rust.lld = false` in your `config.toml` (and open an issue).
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 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

None yet

5 participants