Path coverage in gcc
summary
Implements prime path coverage in GCC and lands in GCC 15 with a new -fpath-coverage instrumenter that emits .gcno and human- and machine-readable reports; prime paths subsume statement, branch, condition, MCDC and def‑use metrics. Enumeration uses a component-graph algorithm plus a suffix-tree filter so each exercised path sets one bit of compact state; practical results show a binary-search example with 20 prime paths (24 reported paths total) and heavy costs — compile time rises from ~170ms to >500ms and a worst-case 32 MB binary.
AI-written summary · about
chapters (16)
- 0:00Prime path coverage in GCC
- 1:09History of GCC coverage
- 3:39Condition and MCDC coverage
- 6:08Data flow and def-use pairs
- 11:09Graphs and basic blocks
- 13:18Prime path examples
- 17:59Prime vs simple paths and cycles
- 19:51Demo: GCC 15 prime paths
- 22:29Why prime path coverage matters
- 24:58Reading GCC reports
- 27:22Output formats
- 28:28Subsumption of coverage criteria
- 30:56Coverage in testing
- 32:23Limitations and performance
- 33:48Algorithms for prime paths
- 36:00Q&A
related talks
28mSafety compliance of Rust libraries
34mThe basics of Profile-Guided Optimization (PGO) in Rust
01h 03mto pass and return, the story of functions, values and compilers
30mProfile-Guided Optimization (PGO) in Rust: unknown parts
36mInching ever closer to the Rust standard library with gccrs
05mInterview
01h 04mWhat Can Compiler Benchmarks Reveal About Metaprogramming Implementation Strategies
55mHow bad is meta-programming still today?
