Skip to content
SPECIFICTION
Get listed

gcov vs LLVM llvm-cov

gcov

gcc.gnu.org

LLVM llvm-cov

llvm.org

Side by side

FiguregcovLLVM llvm-cov
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
Plans published11
Spec score · Test Coverage Tools8.5 (#5)7.5 (#17)
Coverage modesIts options include branch, condition, and prime-path coverage reporting.It works with gcov-style coverage or Clang instrumentation-based profiling.
Purposegcov is a test coverage program used with GCC to find untested parts of programs and guide code optimization.llvm-cov shows code coverage information for programs instrumented to emit profile data.

Plans

gcov

  • gcovFree

gcov pricing →

LLVM llvm-cov

  • LLVM llvm-covFree

LLVM llvm-cov pricing →

In their own words

gcov

gcov is a free test coverage tool used with GCC to show how program code runs during testing. It reports which source lines execute and how often, producing per-line counts in `.gcov` files. Reports can include line, function, branch, condition, prime-path, and basic-block coverage. Options can report branch frequencies, show whether conditions independently affect a Boolean expression’s result, or filter reports to functions matching regular expressions. Output is available as `.gcov` text or gzip-compressed JSON; JSON generation does not require source code. The GCC documentation also describes using gcov with gprof to assess computing time, while warning that optimization can combine source lines and reduce hotspot detail. Before coverage reporting, programs must be compiled with GCC’s `--coverage` option. gcov works only with GCC-compiled code and is not compatible with other profiling or test coverage mechanisms. It runs on Linux, macOS, and Windows, supports the listed languages from C and C++ to Ada, D, and Go, and is self-hosted.

Visit gcc.gnu.org

LLVM llvm-cov

LLVM llvm-cov is a free, self-hosted developer tool for examining coverage in instrumented C, C++, Objective-C, and Objective-C++ programs. It accepts executables, object files, dynamic libraries, or archives and works with gcov-style data or Clang instrumentation-based profiling. Its commands include gcov, show, report, and export. Show provides line-level coverage and can focus on selected source files. Report summarizes measurements such as branch, function, and MC/DC statistics; documented coverage types also include instantiation and region coverage. Output can be text, HTML, JSON, or LCOV. JSON exports may contain regions, functions, branches, expansions, and summaries. A typical workflow builds an instrumented program, runs it to create profile data, then uses llvm-profdata merge before analysis. The gcov command is compatible with gcov from GCC 4.2 and may work with later versions. LLVM documents llvm-cov as part of its developer toolchain. It runs on Linux, macOS, and Windows and has no paid plans or stated usage limits.

Visit llvm.org