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

Add thinlto support to codegen, assembly and coverage tests #118036

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

DianQK
Copy link
Member

@DianQK DianQK commented Nov 18, 2023

Using --emit=llvm-ir with thinlto usually result in multiple IR files.
Resolve test case failure issue reported in #113923.

@rustbot
Copy link
Collaborator

rustbot commented Nov 18, 2023

r? @albertlarsan68

(rustbot has picked a reviewer for you, use r? to override)

@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) labels Nov 18, 2023
@rust-log-analyzer

This comment has been minimized.

@DianQK
Copy link
Member Author

DianQK commented Nov 21, 2023

r? compiler

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Nov 21, 2023
@rustbot rustbot assigned davidtwco and unassigned albertlarsan68 Nov 21, 2023
@tmiasko
Copy link
Contributor

tmiasko commented Nov 29, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Nov 29, 2023

📌 Commit 650b401 has been approved by tmiasko

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 Nov 29, 2023
@Zalathar
Copy link
Contributor

I think the coverage test is going to fail in CI because there is no thin-lto.coverage file. The test will pass in coverage-map mode, but fail in coverage-run mode.

The coverage-run mode is automatically skipped if profiler runtime is not available. So you’ll need to set profiler = true in your [build] section and then run x test coverage --bless again.

@tmiasko
Copy link
Contributor

tmiasko commented Nov 29, 2023

@bors r-
@bors delegate+

@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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 29, 2023
@bors
Copy link
Contributor

bors commented Nov 29, 2023

✌️ @DianQK, you can now approve this pull request!

If @tmiasko told you to "r=me" after making some further change, please make that change, then do @bors r=@tmiasko

@DianQK
Copy link
Member Author

DianQK commented Nov 29, 2023

@tmiasko @Zalathar
Thanks. I added this file.

@bors r=@tmiasko

@bors
Copy link
Contributor

bors commented Nov 29, 2023

📌 Commit 6bdf7ee has been approved by tmiasko

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 29, 2023
@bors
Copy link
Contributor

bors commented Nov 29, 2023

⌛ Testing commit 6bdf7ee with merge 27c1fec...

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 29, 2023
Add thinlto support to codegen, assembly and coverage tests

Using `--emit=llvm-ir` with thinlto usually result in multiple IR files.
Resolve test case failure issue reported in rust-lang#113923.
@bors
Copy link
Contributor

bors commented Nov 29, 2023

💔 Test failed - checks-actions

@rust-log-analyzer

This comment has been minimized.

@DianQK
Copy link
Member Author

DianQK commented Nov 30, 2023

@bors retry (docker failure)

@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 Nov 30, 2023
@bors
Copy link
Contributor

bors commented Nov 30, 2023

⌛ Testing commit 6bdf7ee with merge f393593...

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 30, 2023
Add thinlto support to codegen, assembly and coverage tests

Using `--emit=llvm-ir` with thinlto usually result in multiple IR files.
Resolve test case failure issue reported in rust-lang#113923.
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Nov 30, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 30, 2023
@DianQK
Copy link
Member Author

DianQK commented Nov 30, 2023

I added only-x86_64-unknown-linux-gnu. I should test more platforms, but I think the current one satisfies testing needs.

tests/coverage/thin-lto.rs Outdated Show resolved Hide resolved
@tmiasko
Copy link
Contributor

tmiasko commented Nov 30, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Nov 30, 2023

📌 Commit c41bf96 has been approved by tmiasko

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 Nov 30, 2023
@bors
Copy link
Contributor

bors commented Nov 30, 2023

⌛ Testing commit c41bf96 with merge 07921b5...

@bors
Copy link
Contributor

bors commented Nov 30, 2023

☀️ Test successful - checks-actions
Approved by: tmiasko
Pushing 07921b5 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 30, 2023
@bors bors merged commit 07921b5 into rust-lang:master Nov 30, 2023
12 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Nov 30, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (07921b5): 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)
-0.1% [-0.1%, -0.1%] 3
All ❌✅ (primary) - - 0

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)
3.0% [2.0%, 4.5%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
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)
- - 0
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 671.792s -> 672.048s (0.04%)
Artifact size: 313.36 MiB -> 313.42 MiB (0.02%)

@DianQK DianQK deleted the thinlto-tests branch November 30, 2023 22:29
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 19, 2024
Warn when not having a profiler runtime means that coverage tests won't be run/blessed

On a few occasions (e.g. rust-lang#118036, rust-lang#119984) people have been tripped up by the fact that half of the coverage test suite is skipped by default, because it `// needs-profiler-support` and the profiler runtime is not actually built in any of the default config profiles.

(This is made worse by the fact that it isn't enabled in any of the PR CI jobs either. So people think that they've successfully blessed the test suite, and then get a rude surprise when their merge only fails in the full CI job suite.)

This PR adds a simple warning to compiletest that should alert the user in some cases. It's not foolproof, but it should increase the chances of catching this problem earlier in the PR process.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 19, 2024
Rollup merge of rust-lang#120083 - Zalathar:no-profiler, r=wesleywiser

Warn when not having a profiler runtime means that coverage tests won't be run/blessed

On a few occasions (e.g. rust-lang#118036, rust-lang#119984) people have been tripped up by the fact that half of the coverage test suite is skipped by default, because it `// needs-profiler-support` and the profiler runtime is not actually built in any of the default config profiles.

(This is made worse by the fact that it isn't enabled in any of the PR CI jobs either. So people think that they've successfully blessed the test suite, and then get a rude surprise when their merge only fails in the full CI job suite.)

This PR adds a simple warning to compiletest that should alert the user in some cases. It's not foolproof, but it should increase the chances of catching this problem earlier in the PR process.
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 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-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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants