package/bpftrace: new package
bpftrace is a high-level tracing language for Linux enhanced Berkeley Packet Filter (eBPF) available in recent Linux kernels (4.1 and later). Only tested on x86_64. Signed-off-by: Qais Yousef <qais.yousef@arm.com> Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr> Cc: Qais Yousef <qyousef@layalina.io> Signed-off-by: Mat Martineau <martineau@kernel.org> [Arnout: - Remove duplicate 'depends on BR2_TOOLCHAIN_HAS_THREADS' - Fix Config.in comment text and dependencies - Order dependencies alphabetically ] Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
parent
146498d13c
commit
338acb27ff
@ -2583,6 +2583,9 @@ F: package/synergy/
|
||||
N: Prabhu Sannachi <prabhu.sannachi@collins.com>
|
||||
F: package/redis-plus-plus/
|
||||
|
||||
N: Qais Yousef <qais.yousef@arm.com>
|
||||
F: package/bpftrace/
|
||||
|
||||
N: Rafal Susz <rafal.susz@gmail.com>
|
||||
F: board/avnet/s6lx9_microboard/
|
||||
F: configs/s6lx9_microboard_defconfig
|
||||
@ -2686,6 +2689,7 @@ F: package/alure/
|
||||
F: package/aubio/
|
||||
F: package/bcc/
|
||||
F: package/binutils/
|
||||
F: package/bpftrace/
|
||||
F: package/bullet/
|
||||
F: package/clinfo/
|
||||
F: package/efl/
|
||||
|
@ -91,6 +91,7 @@ menu "Debugging, profiling and benchmark"
|
||||
source "package/blktrace/Config.in"
|
||||
source "package/bonnie/Config.in"
|
||||
source "package/bpftool/Config.in"
|
||||
source "package/bpftrace/Config.in"
|
||||
source "package/cache-calibrator/Config.in"
|
||||
source "package/clinfo/Config.in"
|
||||
source "package/clpeak/Config.in"
|
||||
|
56
package/bpftrace/Config.in
Normal file
56
package/bpftrace/Config.in
Normal file
@ -0,0 +1,56 @@
|
||||
config BR2_PACKAGE_BPFTRACE_ARCH_SUPPORTS
|
||||
bool
|
||||
default y if BR2_aarch64 || BR2_aarch64_be
|
||||
default y if BR2_x86_64
|
||||
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
|
||||
|
||||
config BR2_PACKAGE_BPFTRACE
|
||||
bool "bpftrace"
|
||||
depends on BR2_PACKAGE_BPFTRACE_ARCH_SUPPORTS
|
||||
depends on BR2_USE_MMU # bcc -> python3
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libbpf
|
||||
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS # bcc
|
||||
depends on BR2_TOOLCHAIN_USES_GLIBC # bcc
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # bcc -> clang
|
||||
depends on BR2_INSTALL_LIBSTDCPP # bcc -> clang
|
||||
depends on BR2_HOST_GCC_AT_LEAST_7 # bcc -> clang
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13 # libbpf
|
||||
depends on BR2_USE_WCHAR # bcc -> clang, bcc -> python3, libbpf
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # bcc -> clang, bcc -> python3, libbpf
|
||||
depends on !BR2_STATIC_LIBS # bcc -> clang, bcc -> python3, libbpf
|
||||
select BR2_PACKAGE_BCC
|
||||
select BR2_PACKAGE_BZIP2
|
||||
select BR2_PACKAGE_CEREAL
|
||||
select BR2_PACKAGE_ELFUTILS
|
||||
select BR2_PACKAGE_LIBBPF
|
||||
select BR2_PACKAGE_LLVM
|
||||
# LLVM RTTI mendatory: https://github.com/iovisor/bpftrace/issues/1156
|
||||
select BR2_PACKAGE_LLVM_RTTI
|
||||
select BR2_PACKAGE_XZ
|
||||
help
|
||||
bpftrace is a high-level tracing language for Linux enhanced
|
||||
Berkeley Packet Filter (eBPF) available in recent Linux
|
||||
kernels (4.x).
|
||||
|
||||
bpftrace uses LLVM as a backend to compile scripts to
|
||||
BPF-bytecode and makes use of BCC for interacting with the
|
||||
Linux BPF system, as well as existing Linux tracing
|
||||
capabilities: kernel dynamic tracing (kprobes), user-level
|
||||
dynamic tracing (uprobes), and tracepoints. The bpftrace
|
||||
language is inspired by awk and C, and predecessor tracers
|
||||
such as DTrace and SystemTap.
|
||||
|
||||
It's highly recommended to NOT strip bpftrace binary.
|
||||
To do so, add "bpftrace" to BR2_STRIP_EXCLUDE_FILES.
|
||||
See:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1865787
|
||||
|
||||
https://www.github.com/iovisor/bpftrace
|
||||
|
||||
comment "bpftrace needs a glibc toolchain w/ C++, gcc >= 7, host gcc >= 7, kernel headers >= 4.13"
|
||||
depends on BR2_PACKAGE_BPFTRACE_ARCH_SUPPORTS
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP \
|
||||
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || !BR2_HOST_GCC_AT_LEAST_7 \
|
||||
|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
|
3
package/bpftrace/bpftrace.hash
Normal file
3
package/bpftrace/bpftrace.hash
Normal file
@ -0,0 +1,3 @@
|
||||
# locally calculated
|
||||
sha256 b520340f28ce4d6f2fb2355f1675b6801ff8498ed9e8bff14abbbf6baff5a08e bpftrace-0.19.1.tar.gz
|
||||
sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
|
34
package/bpftrace/bpftrace.mk
Normal file
34
package/bpftrace/bpftrace.mk
Normal file
@ -0,0 +1,34 @@
|
||||
################################################################################
|
||||
#
|
||||
# bpftrace
|
||||
#
|
||||
################################################################################
|
||||
|
||||
BPFTRACE_VERSION = 0.19.1
|
||||
BPFTRACE_SITE = $(call github,iovisor,bpftrace,v$(BPFTRACE_VERSION))
|
||||
BPFTRACE_LICENSE = Apache-2.0
|
||||
BPFTRACE_LICENSE_FILES = LICENSE
|
||||
BPFTRACE_DEPENDENCIES = \
|
||||
bcc \
|
||||
bzip2 \
|
||||
cereal \
|
||||
elfutils \
|
||||
host-bison \
|
||||
host-flex \
|
||||
libbpf \
|
||||
llvm \
|
||||
xz
|
||||
|
||||
# libbfd, libopcodes
|
||||
ifeq ($(BR2_PACKAGE_BINUTILS),y)
|
||||
BPFTRACE_DEPENDENCIES += binutils
|
||||
endif
|
||||
|
||||
BPFTRACE_CONF_OPTS += \
|
||||
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
||||
-DBUILD_TESTING:BOOL=OFF \
|
||||
-DENABLE_MAN:BOOL=OFF \
|
||||
-DINSTALL_TOOL_DOCS:BOOL=OFF \
|
||||
-DUSE_SYSTEM_BPF_BCC:BOOL=ON
|
||||
|
||||
$(eval $(cmake-package))
|
Loading…
Reference in New Issue
Block a user