Inline bpf_get_branch_snapshot() BPF helper
Status from this message: This series was applied to bpf/bpf-next.git (master)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 8 repliesApplied 2/2
- v22 patches 4 repliesSuperseded
- v13 patches 19 repliesSuperseded
Changes in v3 from the cover letter
- fix BPF_MUL instruction definition;
Patches in v3 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | bpf: make bpf_get_branch_snapshot() architecture-agnostickernel/ | +0 | 1 reply | Applied |
| 2/2 | bpf: inline bpf_get_branch_snapshot() helperkernel/ | +55 | 7 replies | Applied |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | John Fastabend | Yonghong Song |
|---|---|---|
| 1/2 | A-b | |
| 2/2 | A-b | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 bpf-next 0/2] Inline bpf_get_branch_snapshot() BPF helper
Implement inlining of bpf_get_branch_snapshot() BPF helper using generic BPF assembly approach. This allows to reduce LBR record usage right before LBR records are captured from inside BPF program.
See v1 cover letter ([0]) for some visual examples. I dropped them from v2 because there are multiple independent changes landing and being reviewed, all of which remove different parts of LBR record waste, so presenting final state of LBR "waste" gets more complicated until all of the pieces land.
[0] https://lore.kernel.org/bpf/[email protected]/
v2->v3:
- fix BPF_MUL instruction definition;v1->v2:
- inlining of bpf_get_smp_processor_id() split out into a separate patch set
implementing internal per-CPU BPF instruction;
- add efficient divide-by-24 through multiplication logic, and leave comments to explain the idea behind it; this way inlined version of bpf_get_branch_snapshot() has no compromises compared to non-inlined version of the helper (Alexei).
Andrii Nakryiko (2):
bpf: make bpf_get_branch_snapshot() architecture-agnostic
bpf: inline bpf_get_branch_snapshot() helper
kernel/bpf/verifier.c | 55 ++++++++++++++++++++++++++++++++++++++++ kernel/trace/bpf_trace.c | 4 --- 2 files changed, 55 insertions(+), 4 deletions(-)
Signature · 1 line
2.43.0