Path coverage in gcc
summary
GCC adds a new fpath-coverage option to emit GCOV data for prime path coverage aimed at GCC 15 (NASA-funded). It computes prime/simple paths across function CFGs, reports missing path traces, and shows concrete line sequences to exercise each path; binary-search demo has 24 prime paths and runs find cases that move coverage from 0 → 12 → 13 → 16, etc. Path coverage subsumes statement/branch/condition/DU but not MCDC; costs grow (typical 3x compile time and larger objects; extreme case 2m26s build and 32 MB object).
AI-written summary · about
chapters (15)
- 0:00Path coverage in GCC
- 1:49NASA funding path coverage
- 5:27Coverage metrics limitations
- 10:24Definition-use pairs
- 14:24Program graphs in compilers
- 16:32Path explosion and prime paths
- 23:05GCC 15 path coverage demo
- 35:00Coverage criteria subsumption
- 38:12Coverage and functional testing
- 45:21Binary search with path coverage
- 50:20Impossible paths handling
- 51:02MCDC in complex code
- 54:18Coverage compatibility and fuzzing
- 56:45Prime paths vs MCDC
- 58:10Optimization and coverage
related talks
59mTheory makes beautiful programs
51mHow Profile-Guided Optimization Makes Your Code Faster Without Any Code Changes
53mOptimizing C for Microcontrollers - Best Practices
06muftrace: A function graph tracer for C/C++ userspace programs
16mWhat Every C++ Programmer Should Know About Modern Compilers
57mModern Linux C++ debugging tools - under the covers
01h 26mBoost your C/C++ Developer's Debugging Powers with GDB
47mFantastic Algorithms and Where To Find Them
