[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191219070659.424273-1-andriin@fb.com>
Date: Wed, 18 Dec 2019 23:06:55 -0800
From: Andrii Nakryiko <andriin@...com>
To: <bpf@...r.kernel.org>, <netdev@...r.kernel.org>, <ast@...com>,
<daniel@...earbox.net>
CC: <andrii.nakryiko@...il.com>, <kernel-team@...com>,
Andrii Nakryiko <andriin@...com>
Subject: [PATCH bpf-next 0/3] Implement runqslower BCC tool with BPF CO-RE
Based on recent BPF CO-RE, tp_btf, and skeleton changes, re-implement
BCC-based runqslower tool as 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, also introduce new `format core` to `bpftool btf
dump` sub-command. It generates same compilable C header file with all the
types from BTF, but additionally ensures seamless use of generated header with
BPF CO-RE. Currently `format core` applies preserve_access_index attribute (if
supported by Clang) to all structs and unions, to improve user experience of
writing TRACING programs with direct kernel memory read access.
Andrii Nakryiko (3):
bpftool: add extra CO-RE mode to btf dump command
libbpf/tools: add runqslower tool to libbpf
selftests/bpf: build runqslower from selftests
.../bpf/bpftool/Documentation/bpftool-btf.rst | 7 +-
tools/bpf/bpftool/bash-completion/bpftool | 2 +-
tools/bpf/bpftool/btf.c | 24 ++-
tools/lib/bpf/tools/runqslower/.gitignore | 2 +
tools/lib/bpf/tools/runqslower/Makefile | 60 ++++++
.../lib/bpf/tools/runqslower/runqslower.bpf.c | 101 ++++++++++
tools/lib/bpf/tools/runqslower/runqslower.c | 187 ++++++++++++++++++
tools/lib/bpf/tools/runqslower/runqslower.h | 13 ++
tools/testing/selftests/bpf/Makefile | 7 +-
9 files changed, 395 insertions(+), 8 deletions(-)
create mode 100644 tools/lib/bpf/tools/runqslower/.gitignore
create mode 100644 tools/lib/bpf/tools/runqslower/Makefile
create mode 100644 tools/lib/bpf/tools/runqslower/runqslower.bpf.c
create mode 100644 tools/lib/bpf/tools/runqslower/runqslower.c
create mode 100644 tools/lib/bpf/tools/runqslower/runqslower.h
--
2.17.1
Powered by blists - more mailing lists