Set mcpu=v3, add mcpu configurable (cmake, env var)
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
The version of BPF instruction set that is targeted by LLVM can be [toggled with the `mcpu` flag](https://www.kernel.org/doc/html/latest/bpf/bpf_devel_QA.html#q-new-bpf-instruction-for-kernel-and-llvm). Per @yonghong-song , internally at Meta we've seen perf wins of 5-15% from bumping to most recent instruction set version, v3.
We currently don't expose a way to change the target instruction set version in the BCC API. We should consider adding a few ways to do this:
* compile-time via cmake
* env var or similar for tools users
* config on `BPF` object BCC api exposes for application developers
We should also consider changing the default to v3. Regardless of whether that's possible, should add the configs anyways.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.