Per-BPF-PC branch profile collector — extracted from eunomia-bpf/bpf-benchmark on 2026-05-08.
bpfprof attaches a fexit sidecar BPF program that calls
bpf_get_branch_snapshot() (x86 LBR), streams hardware branch records
through a ringbuf, and attributes them to specific BPF program call PCs
via prog_jited_line_info and prog_xlated_insns. The output
(branch_count, branch_misses, miss_rate, taken, not_taken per
site) is consumed by the Paper B branch_flip profile-guided
branch-layout pass.
Source archived as-is. Not actively maintained or compiled here.
bpfprof/— CLI entry point (bpfprof --prog-id N --per-site ...)kernel-sys/— syscall wrappers, libbpf-sys re-exports, verifier-log parser.bpfprofdepends on this directly.
MIT (per individual SPDX-License-Identifier headers).