contrib: Skip llvm-cov rendering for deterministic fuzz inputs #35608

pull HowHsu wants to merge 1 commits into bitcoin:master from HowHsu:det-fuzz-cov-profdata-fastpath changing 1 files +75 −34
  1. HowHsu commented at 11:55 AM on June 26, 2026: contributor

    Summary

                                                                                                                                                              

    deterministic-fuzz-coverage rendered a full llvm-cov show report for every
    fuzz input on both runs and diffed the two reports, even though almost all
    inputs are deterministic. llvm-cov show is by far the most expensive step, so
    the vast majority of that work produced two identical reports that were
    immediately discarded.
    Compare the merged .profdata first: identical counters are a sufficient
    condition for deterministic coverage, so when the two profdata files match the
    llvm-cov show rendering is skipped entirely. Only when they differ does it
    fall back to rendering and diffing the reports to confirm and locate the
    difference.
    The pass/fail result is unchanged: identical profdata implies identical
    counters, which implies identical llvm-cov show output (the report is a
    deterministic function of the profdata and the binary). Any profdata difference
    falls back to the exact same llvm-cov diff as before.

    Benchmark

                                                                                                                                                              

    standalone coverage build (-DBUILD_FOR_FUZZING=ON +
    -fprofile-instr-generate -fcoverage-mapping, no sanitizer), par=4,
    qa-assets corpora:

    target inputs before after speedup
    addition_overflow 112 32s 10s 3.2x
    process_message 2386 719s 247s 2.9x
                                                                                                                                                              

    On process_message every input is deterministic, so all 2386 take the
    profdata fast path and zero llvm-cov show reports are rendered, down from
    2*2386 + 2 = 4774.

  2. DrahtBot added the label Scripts and tools on Jun 26, 2026
  3. DrahtBot commented at 11:55 AM on June 26, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35608.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #35809 (contrib: add deterministic fuzz coverage mode by HowHsu)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. contrib: Skip llvm-cov rendering for deterministic fuzz inputs
    deterministic-fuzz-coverage rendered a full `llvm-cov show` report for
    every input on both runs and diffed the two reports. `llvm-cov show`
    is by far the most expensive step, so almost all of that work produced
    two identical reports that were immediately thrown away.
    
    Compare the merged profdata first instead: identical counters are a
    sufficient condition for deterministic coverage, so when the two
    profdata files match we skip rendering entirely. Only when they differ
    do we fall back to rendering and diffing the `llvm-cov show` reports to
    render and locate the difference.
    87ecdf2cf0
  5. HowHsu force-pushed on Jun 26, 2026
  6. DrahtBot added the label CI failed on Jun 26, 2026
  7. DrahtBot removed the label CI failed on Jun 26, 2026
  8. sedited requested review from maflcko on Jul 24, 2026
Contributors


maflcko


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-08-11 19:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me