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

WIP: Injects counters before every block (experimental only) #74856

Closed
wants to merge 3 commits into from

Commits on Jul 25, 2020

  1. Fixed coverage map issues; better aligned with LLVM APIs

    Found some problems with the coverage map encoding when testing with
    more than one counter per function.
    
    While debugging, I realized some better ways to structure the Rust
    implementation of the coverage mapping generator. I refactored somewhat,
    resulting in less code overall, expanded coverage of LLVM Coverage Map
    capabilities, and much closer alignment with LLVM data structures, APIs,
    and naming.
    
    This should be easier to follow and easier to maintain.
    richkadel committed Jul 25, 2020
    Configuration menu
    Copy the full SHA
    12ddd60 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2020

  1. Refactor MIR coverage instrumentation

    Lays a better foundation for injecting more counters in each function.
    richkadel committed Jul 27, 2020
    Configuration menu
    Copy the full SHA
    fa86fc4 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2020

  1. WIP: Injects counters before every block (experimental only)

    Uses the span from the start of the first statement to the end of the
    Terminator.
    
    Includes "cleanup" subgraphs.
    
    This simple approach does introduce some poor coverage results. For
    example, a function that only calls macros (like `println!`, for
    example) may only have counters injected at the macro site, and these
    may never get counted, for some reason. (I'm seeing some functions with
    coverage counts of zero, even though they clearly should be called.)
    
    I'm developing a follow-up change to this one that injects counters more
    precisely, by inspecting the Statement and Terminator types, and making
    different decisions regarding what blocks should be counted, and what
    spans to use to generate the code regions.
    richkadel committed Jul 28, 2020
    Configuration menu
    Copy the full SHA
    ec050f2 View commit details
    Browse the repository at this point in the history