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

[Draft] Tools and tests to experimentally add more counters per function #75828

Closed

Commits on Aug 26, 2020

  1. Tools and tests to experimentally add more counters per function

    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).
    
    Adds `--bless` support to `test/run-make-fulldeps` so expected coverage
    output can be quickly regenerated.
    
    Adds a new `-Zexperimental-coverage` option that implies
    `-Zinstrument-coverage`, but can be used to enable experimental coverage
    counter injection.
    
    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.
    
    Also, learned that `-C link-dead-code` (which was enabled automatically
    under `-Z instrument-coverage`) was causing the linking error that
    resulted in segmentation faults in coverage instrumented binaries. Link
    dead code is now disabled under MSVC, allowing `-Zinstrument-coverage`
    to be enabled under MSVC for the first time.
    
    Rust compiler MCP rust-lang/compiler-team#278
    
    Relevant issue: rust-lang#34701 - Implement support for LLVMs code coverage
    instrumentation
    richkadel committed Aug 26, 2020
    Configuration menu
    Copy the full SHA
    5d13cbc View commit details
    Browse the repository at this point in the history