Skip to content

Implement runqslower BCC tool with BPF CO-RE

Andrii Nakryiko bpf netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 4 repliesIn review
  2. v13 patches 11 repliesSuperseded

Changes in v2 from the cover letter

- build in-tree bpftool for runqslower (Yonghong);
- drop format core and augment format c instead (Alexei);
- move runqslower under tools/bpf (Daniel).

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6tools: sync uapi/linux/if_link.htools/include/uapi/linux/if_link.h+1 -00 replies
2/6libbpf: clean up bpf_helper_defs.h generation outputscripts/bpf_helpers_doc.py tools/lib/bpf/Makefile+1 -30 replies
3/6selftests/bpf: conform selftests/bpf Makefile output to libbpf and bpftooltools/testing/selftests/bpf/Makefile+25 -220 replies
4/6bpftool: apply preserve_access_index attribute to all types in BTF dumptools/bpf/bpftool/btf.c+8 -00 replies
5/6tools/bpf: add runqslower tool to tools/bpftools/bpf/Makefile tools/bpf/runqslower/.gitignore tools/bpf/runqslower/Makefile +3 more+396 -53 replies
6/6selftests/bpf: build runqslower from selfteststools/testing/selftests/bpf/Makefile+6 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 bpf-next 0/6] Implement runqslower BCC tool with BPF CO-RE

Based on recent BPF CO-RE, tp_btf, and BPF skeleton changes, re-implement BCC-based runqslower tool as a portable pre-compiled BPF CO-RE-based tool. Make sure it's built as part of selftests to ensure it doesn't bit rot.

As part of this patch set, augment format c output of bpftool btf dump sub-command with applying preserve_access_index attribute to all structs and unions. This makes all such structs and unions automatically relocatable under BPF CO-RE, which improves user experience of writing TRACING programs with direct kernel memory read access.

Also, further clean up selftest/bpf Makefile output and make it conforming to libbpf and bpftool succinct output format.

v1->v2:
- build in-tree bpftool for runqslower (Yonghong);
- drop format core and augment format c instead (Alexei);
- move runqslower under tools/bpf (Daniel).

Andrii Nakryiko (6):
tools: sync uapi/linux/if_link.h
libbpf: clean up bpf_helper_defs.h generation output selftests/bpf: conform selftests/bpf Makefile output to libbpf and
bpftool
bpftool: apply preserve_access_index attribute to all types in BTF
dump
tools/bpf: add runqslower tool to tools/bpf selftests/bpf: build runqslower from selftests

 scripts/bpf_helpers_doc.py            |   2 -
 tools/bpf/Makefile                    |  20 ++-
 tools/bpf/bpftool/btf.c               |   8 ++
 tools/bpf/runqslower/.gitignore       |   1 +
 tools/bpf/runqslower/Makefile         |  80 +++++++++++
 tools/bpf/runqslower/runqslower.bpf.c | 100 ++++++++++++++
 tools/bpf/runqslower/runqslower.c     | 187 ++++++++++++++++++++++++++
 tools/bpf/runqslower/runqslower.h     |  13 ++
 tools/include/uapi/linux/if_link.h    |   1 +
 tools/lib/bpf/Makefile                |   2 +-
 tools/testing/selftests/bpf/Makefile  |  54 ++++----
 11 files changed, 437 insertions(+), 31 deletions(-)
 create mode 100644 tools/bpf/runqslower/.gitignore
 create mode 100644 tools/bpf/runqslower/Makefile
 create mode 100644 tools/bpf/runqslower/runqslower.bpf.c
 create mode 100644 tools/bpf/runqslower/runqslower.c
 create mode 100644 tools/bpf/runqslower/runqslower.h
Signature · 1 line
2.17.1