Skip to content

coverage: Extract safe FFI wrapper functions to llvm_cov#132452

Merged
bors merged 2 commits into
rust-lang:masterfrom
Zalathar:llvm-cov-wrappers
Nov 8, 2024
Merged

coverage: Extract safe FFI wrapper functions to llvm_cov#132452
bors merged 2 commits into
rust-lang:masterfrom
Zalathar:llvm-cov-wrappers

Conversation

@Zalathar

@Zalathar Zalathar commented Nov 1, 2024

Copy link
Copy Markdown
Member

This PR takes all of the inline unsafe calls in coverage codegen, and all the safe wrapper functions in coverageinfo/mod.rs, and moves them to a new llvm_cov submodule that is dedicated to safe FFI wrapper functions. This reduces the mixing of abstraction levels in the rest of coverage codegen.

As a follow-up, this PR also tidies up the names and signatures of several of the coverage FFI functions.

@Zalathar Zalathar added the A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) label Nov 1, 2024
@rustbot

rustbot commented Nov 1, 2024

Copy link
Copy Markdown
Collaborator

r? @chenyukang

rustbot has assigned @chenyukang.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Nov 1, 2024
@Zalathar

Zalathar commented Nov 1, 2024

Copy link
Copy Markdown
Member Author

Follow-up to #131962 (comment).

@bors

bors commented Nov 4, 2024

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #132581) made this pull request unmergeable. Please resolve the merge conflicts.

@Zalathar Zalathar force-pushed the llvm-cov-wrappers branch 2 times, most recently from 88451ee to 89ce0fb Compare November 5, 2024 04:29
@Zalathar

Zalathar commented Nov 5, 2024

Copy link
Copy Markdown
Member Author

Reverted the small change to VirtualFileMapping to avoid conflicts with other things I'm working on (diff).

@jieyouxu

jieyouxu commented Nov 7, 2024

Copy link
Copy Markdown
Member

r? jieyouxu

@rustbot rustbot assigned jieyouxu and unassigned chenyukang Nov 7, 2024

@jieyouxu jieyouxu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment on lines +96 to +97
/// as a raw numeric value. For historical reasons, the numeric value is 1 less
/// than the number in the version's name, so `Version7` is actually `6u32`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

@jieyouxu

jieyouxu commented Nov 8, 2024

Copy link
Copy Markdown
Member

@bors r+ rollup

@bors

bors commented Nov 8, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit 19d5dc0 has been approved by jieyouxu

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 8, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 8, 2024
Rollup of 5 pull requests

Successful merges:

 - rust-lang#132161 ([StableMIR] A few fixes to pretty printing)
 - rust-lang#132389 (coverage: Simplify parts of coverage graph creation)
 - rust-lang#132452 (coverage: Extract safe FFI wrapper functions to `llvm_cov`)
 - rust-lang#132590 (Simplify FFI calls for `-Ztime-llvm-passes` and `-Zprint-codegen-stats`)
 - rust-lang#132738 (Initialize channel `Block`s directly on the heap)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 758a904 into rust-lang:master Nov 8, 2024
@rustbot rustbot added this to the 1.84.0 milestone Nov 8, 2024
@Zalathar Zalathar deleted the llvm-cov-wrappers branch November 8, 2024 10:28
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 8, 2024
Rollup merge of rust-lang#132452 - Zalathar:llvm-cov-wrappers, r=jieyouxu

coverage: Extract safe FFI wrapper functions to `llvm_cov`

This PR takes all of the inline `unsafe` calls in coverage codegen, and all the safe wrapper functions in `coverageinfo/mod.rs`, and moves them to a new `llvm_cov` submodule that is dedicated to safe FFI wrapper functions. This reduces the mixing of abstraction levels in the rest of coverage codegen.

As a follow-up, this PR also tidies up the names and signatures of several of the coverage FFI functions.
mati865 pushed a commit to mati865/rust that referenced this pull request Nov 12, 2024
…ouxu

coverage: Extract safe FFI wrapper functions to `llvm_cov`

This PR takes all of the inline `unsafe` calls in coverage codegen, and all the safe wrapper functions in `coverageinfo/mod.rs`, and moves them to a new `llvm_cov` submodule that is dedicated to safe FFI wrapper functions. This reduces the mixing of abstraction levels in the rest of coverage codegen.

As a follow-up, this PR also tidies up the names and signatures of several of the coverage FFI functions.
mati865 pushed a commit to mati865/rust that referenced this pull request Nov 12, 2024
Rollup of 5 pull requests

Successful merges:

 - rust-lang#132161 ([StableMIR] A few fixes to pretty printing)
 - rust-lang#132389 (coverage: Simplify parts of coverage graph creation)
 - rust-lang#132452 (coverage: Extract safe FFI wrapper functions to `llvm_cov`)
 - rust-lang#132590 (Simplify FFI calls for `-Ztime-llvm-passes` and `-Zprint-codegen-stats`)
 - rust-lang#132738 (Initialize channel `Block`s directly on the heap)

r? `@ghost`
`@rustbot` modify labels: rollup
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) 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