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 6 pull requests #100611

Merged
merged 15 commits into from
Aug 16, 2022
Merged

Rollup of 6 pull requests #100611

merged 15 commits into from
Aug 16, 2022

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

ridwanabdillahi and others added 15 commits August 11, 2022 16:04
…ng the `-C instrument-coverage` flag.

Respond to PR comments.
emit the first 3 errors and duplicated diagnostic information
using take of iterator for the first third return
	modified:   compiler/rustc_typeck/src/check/coercion.rs
	new file:   src/test/ui/typeck/issue-100285.rs
	new file:   src/test/ui/typeck/issue-100285.stderr
…rochenkov

when there are 3 or more return statements in the loop

emit the first 3 errors and duplicated diagnostic information
	modified:   compiler/rustc_typeck/src/check/coercion.rs
	new file:   src/test/ui/typeck/issue-100285.rs
	new file:   src/test/ui/typeck/issue-100285.stderr
…ut, r=wesleywiser

Add support for generating unique profraw files by default when using `-C instrument-coverage`

Currently, enabling the rustc flag `-C instrument-coverage` instruments the given crate and by default uses the naming scheme `default.profraw` for any instrumented profile files generated during the execution of a binary linked against this crate. This leads to multiple binaries being executed overwriting one another and causing only the last executable run to contain actual coverage results.

This can be overridden by manually setting the environment variable `LLVM_PROFILE_FILE` to use a unique naming scheme.

This PR adds a change to add support for a reasonable default for rustc to use when enabling coverage instrumentation similar to how the Rust compiler treats generating these same `profraw` files when PGO is enabled.

The new naming scheme is set to `default_%m_%p.profraw` to ensure the uniqueness of each file being generated using [LLVMs special pattern strings](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#running-the-instrumented-program).

Today the compiler sets the default for PGO `profraw` files to `default_%m.profraw` to ensure a unique file for each run. The same can be done for the instrumented profile files generated via the `-C instrument-coverage` flag as well which LLVM has API support for.

Linked Issue: rust-lang#100381

r? `@wesleywiser`
Update the minimum external LLVM to 13

With this change, we'll have stable support for LLVM 13 through 15 (pending release).
For reference, the previous increase to LLVM 12 was rust-lang#90175.

r? `@nagisa`
…h, r=compiler-errors

Suggest adding an array length if possible

fixes rust-lang#100448
…lfJung

Rename Machine memory hooks to suggest when they run

Some of the other memory hooks start with `before_` or `after_` to indicate that they run before or after a certain operation. These don't, so I was a bit confused as to when they are supposed to run.

`memory_read` can be read two ways in English, "memory was read" or "this is a memory read" so without the prefix this was especially ambiguous.
@rustbot rustbot added 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 16, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=6

@bors
Copy link
Contributor

bors commented Aug 16, 2022

📌 Commit 88af506 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 16, 2022
@bors
Copy link
Contributor

bors commented Aug 16, 2022

⌛ Testing commit 88af506 with merge 8556e66...

@bors
Copy link
Contributor

bors commented Aug 16, 2022

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 16, 2022
@bors bors merged commit 8556e66 into rust-lang:master Aug 16, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 16, 2022
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #100611!

Tested on commit 8556e66.
Direct link to PR: #100611

💔 miri on windows: test-pass → build-fail (cc @oli-obk @RalfJung).
💔 miri on linux: test-pass → build-fail (cc @oli-obk @RalfJung).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Aug 16, 2022
Tested on commit rust-lang/rust@8556e66.
Direct link to PR: <rust-lang/rust#100611>

💔 miri on windows: test-pass → build-fail (cc @oli-obk @RalfJung).
💔 miri on linux: test-pass → build-fail (cc @oli-obk @RalfJung).
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Perf Build Sha
#100600 48f170bec56ceba55c339a6da9b2440f84f3fcdc
#100590 b5797b679653366ae3c01c9d86d1187fe98e30b4
#100567 1d62153d13e31fa3bf9f7b80687b1241210187f3
#100460 7ae02cf010d4a1e97b1b49d20c2908ba48797a42
#100384 c16933dd34d3e67cfeb0cc3d04ca153ce6008cc6
#100338 3fc06e22cf6d49a7ea0dd9c788ebc6355f9af327

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 (8556e66): comparison url.

Instruction count

  • Primary benchmarks: ❌ relevant regression found
  • Secondary benchmarks: ❌ relevant regressions found
( ) mean1 max count2
Regressions ❌
(primary)
0.2% 0.2% 1
Regressions ❌
(secondary)
0.3% 0.4% 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% 0.2% 1

Max RSS (memory usage)

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: mixed results
( ) mean1 max count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.1% 3.1% 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% -2.6% 1
All ❌✅ (primary) - - 0

Cycles

Results
  • Primary benchmarks: ❌ relevant regressions found
  • Secondary benchmarks: ✅ relevant improvement found
( ) mean1 max count2
Regressions ❌
(primary)
2.4% 2.8% 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% -2.2% 1
All ❌✅ (primary) 2.4% 2.8% 2

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@matthiaskrgr matthiaskrgr deleted the rollup-rxj10ur branch October 9, 2022 00:31
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 26, 2023
Remove backwards compat for LLVM 12 coverage format

The minimum external LLVM was updated to 13 recently in rust-lang#100611, so this PR removes backwards compat with older coverage formats.

I kept the version check and error message there, in accordance with this comment: rust-lang#91207 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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-infra Relevant to the infrastructure 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.

10 participants