-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Moved coverage counter injection from BasicBlock to Statement. #75563
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
r? @wesleywiser |
3973af6
to
802a3d2
Compare
This code builds for me without errors, even after I did another I made a couple of what seem to be insignificant changes just now, and pushed them after successful testing locally. We'll see if something changes. Note the way that I'm deriving these traits appears to be identical to how they are derived for other structs and enums, even in the same crate Maybe I need a bootstrap config? I'm not sure. Here's a snippet from the errors in the CI log, for reference:
|
I just tested this on my local Linux workstation, after completely deleting my @wesleywiser @tmandry - Are you familiar with this kind of issue? The only thing different is I synched up my fork from rust-lang/rust yesterday around noon. I can try synching again, but it seems too high of a coincidence that someone changed something in RustcEncoder/Decoder in the last 24 hours. Plus the error is only affecting my new structs and enums, and none of the others in the same package. So I assume there's a different explanation. |
#73851 merged 16 hours ago and is a pretty big rework of the serialization infra, I would rebase atop that. |
Ah. Thanks Mark. I'll do that. |
OK, yes, I can repro this locally now. |
802a3d2
to
83d0772
Compare
src/test/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff
Outdated
Show resolved
Hide resolved
83d0772
to
7166355
Compare
ff2b514
to
04939cf
Compare
@Mark-Simulacrum - I'd like to "@bors try" this PR with tests enabled, for Linux, Mac, and Windows-Gnu. (MSVC is not currently supported). Can you provide current instructions to set that up? Thanks! |
You should enable at most 2 builders on try at the same time (and wait to kick off a build until the previous one finishes), with at most 1 apple builder in any try run. The steps are roughly: After editing run ./x.py run src/tools/expand-yaml-anchors and push |
☔ The latest upstream changes (presumably #75187) made this pull request unmergeable. Please resolve the merge conflicts. |
04939cf
to
6381f8a
Compare
@Mark-Simulacrum - Thanks! I'm starting with Linux and MacOS (1 builder each). See below. If I've done this wrong, let me know. When you say _"...and wait to kick off a build until the previous one finishes", do you mean, if there is another try job currently in progress, manually watch the queue, wait for it to finish, and then submit Or is there a way I can automate this? (FYI, I'm not sure I have the github permissions to start my own strategy:
matrix:
include:
- name: x86_64-gnu
<<: *job-linux-xl
- name: x86_64-apple
env:
SCRIPT: ./x.py --stage 2 test
RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
MACOSX_DEPLOYMENT_TARGET: 10.8
MACOSX_STD_DEPLOYMENT_TARGET: 10.7
NO_LLVM_ASSERTIONS: 1
NO_DEBUG_ASSERTIONS: 1
<<: *job-macos-xl |
(FYI, if the snippet looks right, the PR has been updated, and is ready for the |
@bors try |
⌛ Trying commit 6381f8a4dcf3caf223b4289d465e932ae4f46de5 with merge 67ed07aa158e60bc073ab0ad5616071768ee2a5b... |
Snippet looks right. Mostly it should be fine to start these on this PR not in parallel (i.e., don't request another try build on new push until this one finishes); we don't actually have metrics to see how much capacity we have but we try to avoid spawning too many builders on non-auto branch |
☔ The latest upstream changes (presumably #75145) made this pull request unmergeable. Please resolve the merge conflicts. |
@Mark-Simulacrum - The I'm not able to find the running logs for my Thanks |
⌛ Trying commit 36a96633aa7982177668f7bc607364cf3c666f22 with merge 56bc179652e0615fe28be47135c9b5b7c6589ab5... |
☀️ Try build successful - checks-actions, checks-azure |
8ca90f3
to
8675879
Compare
@wesleywiser I made changes per your feedback, and also removed the changes to ci.yml files that expanded the bors try tests. |
☔ The latest upstream changes (presumably #75566) made this pull request unmergeable. Please resolve the merge conflicts. |
I think for now, I'd prefer to leave it as |
8675879
to
5040cd0
Compare
I just resolved the new conflicts in the test .diff files. @wesleywiser - If you're ready, can we submit to bors with norollup? There have been a lot of conflicts over the past 24 hours. Thanks |
5040cd0
to
d0a851c
Compare
Hmm, I must have missed the formatting issue last night. Fixed. |
cc @rust-lang/compiler This PR adds a new MIR The new approach here is much simpler overall and most of the rest of rustc can treat this new statement as a nop. |
d0a851c
to
4df8bb9
Compare
4df8bb9
to
d129ac2
Compare
(Minor change. I just removed an unused parameter, is_cleanup, not needed now that I'm using "Statement".) |
@bors r+ |
📌 Commit d129ac2 has been approved by |
☀️ Test successful - checks-actions, checks-azure |
🎉 Thanks @wesleywiser and @tmandry ! This will make everything else much better and easier. I'm making good progress on injecting counters with good coverage spans, for branches (starting with specific cases). I'll share these soon, along with tests. |
/// Coverage code region and counter metadata. | ||
Coverage, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@richkadel is PlaceContext::NonUse(NonUseContext::Coverage)
reserved for a future use? It's never constructed currently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tmiasko I think this got left in accidentally from a prior version of these changes where it was used. I believe it can be removed.
As discussed on Zulip: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Implement.20LLVM-compatible.20source-based.20cod.20compiler-team.23278