Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Improve source coverage of HTML reports #2699

@ranweiler

Description

@ranweiler

HTML coverage reports are confusingly sparse. While we will always expect some reporting noise for optimized targets, this is exacerbated by our use of Sancov instrumentation sites as the only source of binary coverage. This is because in general, the instrumented sites will not include blocks that are redundant. To recover such block, we would need something like a postdominator analysis of the CFG. Even if no blocks were pruned, we have the same problem for instructions within a block, which may include multiple source lines of code.

To fix this, we will only instrument based on our own CFG analysis. Then, when generating source coverage, we will "reinflate" blocks and look up source line coverage for every instruction in the block (not just the block entrypoint).

To enable this:

  • Write a new crate for easier, unified analysis of debuginfo and block recovery
  • Rewrite coverage analysis to use this crate
  • Factor out existing coverage-related file formats into new crate, adding versioning and simpler, normalized formats
  • Use the new coverage recording in the coverage tasks (with backwards-compatible report file deserialization)

AB#42609819

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions