Tools, tests, and experimenting with MIR-derived coverage counters
Adds a new mir_dump output file in HTML/CSS to visualize code regions and the MIR features that they came from (including overlapping spans). See example below: Includes a basic, MIR-block-based implementation of coverage injection, available via `-Zexperimental-coverage`. This implementation has known flaws and omissions, but is simple enough to validate the new tools and tests. The existing `-Zinstrument-coverage` option currently enables function-level coverage only, which at least appears to generate accurate coverage reports at that level. Experimental coverage is not accurate at this time. When branch coverage works as intended, the `-Zexperimental-coverage` option should be removed. This PR replaces the bulk of PR #75828, with the remaining parts of that PR distributed among other separate and indentpent PRs. This PR depends on three of those other PRs: #76000, #76002, and Rust compiler MCP rust-lang/compiler-team#278 Relevant issue: #34701 - Implement support for LLVMs code coverage instrumentation 
This commit is contained in:
parent
e36e4bd0f7
commit
51d692cf77
28 changed files with 2070 additions and 297 deletions
|
@ -890,6 +890,11 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
|
|||
all statements)."),
|
||||
emit_stack_sizes: bool = (false, parse_bool, [UNTRACKED],
|
||||
"emit a section containing stack size metadata (default: no)"),
|
||||
experimental_coverage: bool = (false, parse_bool, [TRACKED],
|
||||
"enable and extend the `-Z instrument-coverage` function-level coverage \
|
||||
feature, adding additional experimental (likely inaccurate) counters and \
|
||||
code regions (used by `rustc` compiler developers to test new coverage \
|
||||
counter placements) (default: no)"),
|
||||
fewer_names: bool = (false, parse_bool, [TRACKED],
|
||||
"reduce memory use by retaining fewer names within compilation artifacts (LLVM-IR) \
|
||||
(default: no)"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue