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

Rollup of 10 pull requests #119754

Merged
merged 22 commits into from
Jan 9, 2024
Merged

Rollup of 10 pull requests #119754

merged 22 commits into from
Jan 9, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Laura7089 and others added 22 commits January 5, 2024 02:36
The output is produced by printf from C code in these cases, and printf prints in text mode, which means `\n` will be printed as `\r\n` on Windows.
In --bless mode the new output with `\r\n` will replace expected output in `tests/run-make/raw-dylib-*\output.txt` files, which use \n, always resulting in dirty files in the repo.
The code for anonymizing line numbers in coverage reports now supports the
slightly different line number syntax used by branch regions.
The standard library's std::sync::mpsc basically is a crossbeam channel,
and for the use case here will definitely suffice. This drops this
dependency from librustc_driver.
…ebuginfo.rs, r=petrochenkov

Improved support of collapse_debuginfo attribute for macros.

Added walk_chain_collapsed function to consider collapse_debuginfo attribute in parent macros in call chain.
Fixed collapse_debuginfo attribute processing for cranelift (there was if/else branches error swap).

cc rust-lang#100758
coverage: `llvm-cov` expects column numbers to be bytes, not code points

Normally the compiler emits column numbers as a 1-based number of Unicode code points.

But when we embed coverage mappings for `-Cinstrument-coverage`, those mappings will ultimately be read by the `llvm-cov` tool. That tool assumes that column numbers are 1-based numbers of *bytes*, and relies on that assumption when slicing up source code to apply highlighting (in HTML reports, and in text-based reports with colour).

For the very common case of all-ASCII source code, bytes and code points are the same, so the difference isn't noticeable. But for code that contains non-ASCII characters, emitting column numbers as code points will result in `llvm-cov` slicing strings in the wrong places, producing mangled output or fatal errors.

(See taiki-e/cargo-llvm-cov#275 as an example of what can go wrong.)
remove an unnecessary stderr-per-bitwidth

also update some regexp, `a(lloc)?` would no longer match now that we have compiletest itself do alloc ID normalization.

r? ````@oli-obk````
…lacrum

tests: Normalize `\r\n` to `\n` in some run-make tests

The output is produced by printf from C code in these cases, and printf prints in text mode, which means `\n` will be printed as `\r\n` on Windows.

In --bless mode the new output with `\r\n` will replace expected output in `tests/run-make/raw-dylib-*\output.txt` files, which use \n, always resulting in dirty files in the repo.
coverage: Anonymize line numbers in branch views

Extracted from rust-lang#118305, as this is now the only part of that PR that needs to touch compiletest.

---

Coverage tests run the `llvm-cov` tool to generate a coverage report for a test program, and then compare the report against a known-good snapshot.

We use the `anonymize_coverage_line_numbers` function to replace line numbers in coverage reports with `LL`, so that they are less sensitive to lines being added or removed. This PR augments the existing code by making it also support the slightly different line number syntax used when reporting branch regions.

Currently the compiler never emits branch regions, so there is no way to write a coverage test that makes use of this new capability. Instead, I've added a unit test that checks against some sample reports taken from rust-lang#118305. That unit test can be removed when some form of branch coverage support gets merged, and real branch coverage tests are added to the coverage test suite.

(I have also manually tested this change as part of my draft branch-coverage PR.)
…re, r=Nilstrieb

Fix two variable binding issues in lint let_underscore

Fixes rust-lang#119696
Fixes rust-lang#119697
…r=fmease

Add helper for when we want to know if an item has a host param

r? ````@fmease```` since you're a good reviewer and no good deed goes unpunished

This helper will see far more usages as built-in traits get constified.
Add `riscv32imafc-esp-espidf` tier 3 target for the ESP32-P4.

The tier 3 target answers in the original PR are still relevant, so please review them here: rust-lang#87666 (comment)

cc: ``@ivmarkov``
…davidtwco

Remove crossbeam-channel

The standard library's std::sync::mpsc basically is a crossbeam channel, and for the use case here will definitely suffice. This drops this dependency from librustc_driver.
@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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jan 8, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Jan 8, 2024

📌 Commit 1c9e862 has been approved by matthiaskrgr

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 Jan 8, 2024
@bors
Copy link
Contributor

bors commented Jan 9, 2024

⌛ Testing commit 1c9e862 with merge d6affcf...

@bors
Copy link
Contributor

bors commented Jan 9, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing d6affcf to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 9, 2024
@bors bors merged commit d6affcf into rust-lang:master Jan 9, 2024
12 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 9, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#118903 Improved support of collapse_debuginfo attribute for macros. 8fec185a12ffd913fa9579b85b97736aadabd372 (link)
#119033 coverage: llvm-cov expects column numbers to be bytes, no… fe2ee806f7c8e3c7d925815e2b231d93fb8e3347 (link)
#119598 Fix a typo in core::ops::Deref's doc c9c3e7e0698d83690330d800fa12b0f78d509630 (link)
#119660 remove an unnecessary stderr-per-bitwidth a77f838a91786f032c966fcd4e93d4c18e64d59b (link)
#119663 tests: Normalize \r\n to \n in some run-make tests d0297d5219a7f0576dd51e7a63ade85bcd38a8ec (link)
#119681 coverage: Anonymize line numbers in branch views 030d4194fc8a6f3215dff0b723d2feffd91a4cb9 (link)
#119704 Fix two variable binding issues in lint let_underscore 9f8b8bc8a1730c7b5f2218830141115855f85708 (link)
#119725 Add helper for when we want to know if an item has a host p… a620b067bd74cfe4a4d144c4a3e6d9c2604923ff (link)
#119738 Add riscv32imafc-esp-espidf tier 3 target for the ESP32-P… 0a508ce21818e0018f025f142f32e08848b26db3 (link)
#119740 Remove crossbeam-channel d7d79edd18b32e5e3ca67eacdf0babb433f5c613 (link)

previous master: ca663b06c5

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d6affcf): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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)
2.4% [2.4%, 2.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
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.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
-1.8% [-1.8%, -1.8%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.7% [-1.8%, 0.5%] 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)
-0.6% [-0.7%, -0.5%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.6% [-0.7%, -0.5%] 2

Binary size

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

Bootstrap: 668.073s -> 669.325s (0.19%)
Artifact size: 308.47 MiB -> 308.52 MiB (0.02%)

@rustbot rustbot added the perf-regression Performance regression. label Jan 9, 2024
@pnkfelix
Copy link
Member

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jan 16, 2024
@matthiaskrgr matthiaskrgr deleted the rollup-7cht4m5 branch March 16, 2024 18:18
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. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. rollup A PR which is a rollup 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. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.