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

coverage: Consolidate FFI types into one module #114360

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Aug 2, 2023

Coverage FFI types were historically split across two modules, because some of them were needed by code in rustc_codegen_ssa.

Now that all of the coverage codegen code has been moved into rustc_codegen_llvm (#113355), it's possible to move all of the FFI types into a single module, making it easier to see all of them at once.


This PR only moves code and adjusts imports; there should be no functional changes.

Coverage FFI types were historically split across two modules, because some of
them were needed by code in `rustc_codegen_ssa`.

Now that all of the coverage codegen code has been moved into
`rustc_codegen_llvm` (rust-lang#113355), it's possible to move all of the FFI types into
a single module, making it easier to see all of them at once.
@rustbot
Copy link
Collaborator

rustbot commented Aug 2, 2023

r? @oli-obk

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

@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 Aug 2, 2023
@Zalathar
Copy link
Contributor Author

Zalathar commented Aug 2, 2023

@rustbot label +A-code-coverage

@rustbot rustbot added the A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) label Aug 2, 2023
@Zalathar
Copy link
Contributor Author

Zalathar commented Aug 2, 2023

I chose to move code out of llvm::ffi and into coverageinfo::ffi for a few reasons:

  • llvm::ffi is already huge, so the types are easier to browse in their own smaller file
  • There's only one type to actually move, plus a bunch of its constructors
  • It feels slightly weird to have those constructors taking up vertical space in llvm::ffi

@oli-obk
Copy link
Contributor

oli-obk commented Aug 2, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 2, 2023

📌 Commit d6ed6e3 has been approved by oli-obk

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 Aug 2, 2023
@bors
Copy link
Contributor

bors commented Aug 2, 2023

⌛ Testing commit d6ed6e3 with merge 5cbfee5...

@bors
Copy link
Contributor

bors commented Aug 2, 2023

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 5cbfee5 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 2, 2023
@bors bors merged commit 5cbfee5 into rust-lang:master Aug 2, 2023
@rustbot rustbot added this to the 1.73.0 milestone Aug 2, 2023
@Zalathar Zalathar deleted the ffi-types branch August 2, 2023 09:39
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5cbfee5): 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.6% [-0.6%, -0.6%] 1
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)
2.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-2.7%, -2.7%] 1
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)
- - 0
Improvements ✅
(primary)
-3.3% [-3.3%, -3.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.3% [-3.3%, -3.3%] 1

Binary size

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

Bootstrap: 650.605s -> 648.769s (-0.28%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) 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-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.

5 participants