xcover
eBPF-based functional test coverage profiler that works without instrumenting binaries
TLDR
/path/to/bin test2
xcover stop```
**Generate** a JSON coverage report
SYNOPSIS
xcover <command> [options]
DESCRIPTION
xcover uses kernel eBPF uprobes to trace function calls in any compiled ELF binary (Go, C, Rust, etc.) during test execution. No source changes or recompilation with coverage flags are required.It supports daemon mode so you can start tracing, execute arbitrary test suites or manual runs, then stop and obtain a report of which functions were exercised. Stripped Go binaries can still be symbolized via `.gopclntab`; other stripped binaries can use `--debug-path` for a separate debug file.
PARAMETERS
--path EXEPATH_
ELF executable to profile.--pid PID
Filter by process ID.--include / --exclude regex
Include or exclude function symbol names.--scope binary|project
All functions (default) or only the producing Go module's symbols.--report
Write JSON coverage report (default true on run).--debug-path path
Separate debug/symbol file for stripped non-Go binaries.--detach
Run as a background daemon.
COMMANDS
run
Start profiling. Key flags: `--detach`/`-d`, `--path`/`-p`, `--pid`, `--include`/`--exclude` regexes, `--scope` (`binary` or `project` for Go modules), `--report`, `--debug-path`, `--no-build-id-check`, `--verbose`.wait
Block until the profiler is fully initialized and tracing.status
Show whether the profiler daemon is running.stop
Stop the daemon and finalize results/report (`xcover-report.json` when reporting is enabled).
CAVEATS
- Requires a Linux kernel with eBPF support and appropriate permissions (usually root or CAP_BPF).- Stripped binaries need language-specific fallbacks (`.gopclntab` for Go) or separate debug info.- Measures function coverage at the binary level, not line/branch coverage inside functions.- Single-file `go build main.go` binaries lack module metadata; project scope falls back to binary scope.
