-
Notifications
You must be signed in to change notification settings - Fork 391
Optional LBR support #1197
Description
LBR can be used for SPGO and BOLT optimization in LLVM (and probably other similar things). For BOLT there's ebpf-bolt, which is currently fairly limited to a single PID and suffers from issues that are already solved in opentelemetry-ebpf-profiler (like address mapping). I think it would be beneficial to allow opentelemetry-ebpf-profiler to optionally capture LBR data to enable advanced uses beyond stacks and flamegraphs.
The userspace part would have to configure LBR (example from ebpf-bolt). In ebpf code there would need to be a call to bpf_read_branch_records to capture the records, which are 3 u64 times however deep the LBR buffer is (16 on Zen v4).
Somewhat related, here's my WIP PR for enabling LBR in ebpf_exporter: cloudflare/ebpf_exporter#610.