Coverage tasks spend 45 minutes in gcovr and drop branch data

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • WT12.0.0, 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: Evergreen
    • None
    • Storage Engines
    • 290.401
    • None
    • None

      Problem

      The code statistics variant spends ~45 minutes of each coverage-report task inside gcovr, for two reasons. First, the pinned gcovr 5.0 predates the gcov 14 output format used by the current toolchain: it emits ~11 million parse warnings per task (the 2.5GB task logs) and silently drops the records it cannot parse, about a third of all branches, so reported branch coverage is overstated (43.5% vs a real 31%). Second, gcovr's -j flag only creates threads, which are GIL-bound while parsing, so a single gcovr process crawls all 16 build directories serially.

      Change

      Upgrade gcovr to 8.6 and convert the raw coverage data with parallel gcovr processes, merging the resulting JSON tracefiles into the report. Pass --include-internal-functions, as gcovr 8 silently excludes functions starting with "__" by default, which is nearly every WiredTiger function.

      Test

      Local end-to-end run of code_coverage_analysis.sh on a 16-core ARM64 host with toolchain gcc/gcov 14.2: analysis drops from 3m15s (gcovr alone) to 79s total, and merged totals match a single-process run exactly. Expect reported branch coverage to step down to the corrected value.

            Assignee:
            Luke Pearson
            Reporter:
            Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: