« All posts

Xcover Brings Instrumentation-Free Test Coverage via eBPF

Xcover is a language-agnostic tool that measures functional test coverage on ELF binaries using eBPF kernel probes, with no source instrumentation required.

Xcover is a new coverage profiler that measures functional test coverage without modifying source code or instrumenting binaries at compile time, unlike ecosystem-specific tools such as Go cover or LLVM cov. It works by attaching eBPF probes at the kernel level to trace userland function calls directly from ELF binaries, making it language-agnostic and suitable for production use with minimal overhead.

The tool runs as a daemon: you launch the profiler, execute your test suites, then stop it to collect a JSON coverage report. It supports filtering by process, binary path, or function name via regex, and for Go binaries offers a 'project scope' mode that limits tracing to functions belonging to the target module, filtering out standard library and dependency noise.

For stripped binaries, Xcover automatically falls back to the .gopclntab section in Go binaries to recover function metadata, and for other languages it can use a separate debug file matched via GNU build-id to restore symbol names. This makes coverage analysis viable even on optimized production binaries. For engineers, the key value is a single, cross-language coverage solution that integrates cleanly into CI/CD pipelines without touching source code.

» SourceHashnode #10