From nobody Sun Feb 8 22:48:55 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8EF5825A2B5 for ; Thu, 6 Mar 2025 18:18:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741285104; cv=none; b=uEBhH6ZpY6chmcnVgJUdQeCeQiir5FGZeFN1lLtsF0Ogfu1zQ7knLzXHIl4Rdpyrjklr49VvxGyLN8SiN3wtAn79Hcbg0GAbb10xUycECxZPdVgSU5MS3AkqSPzEriwN+akuRj0ary2XjAymjOzne8QEtO6+XkcG/ykvsprMVEE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741285104; c=relaxed/simple; bh=gsaXe5RYlJkso+aavT0nSGeOjR6X2weyybAnNMJE7Mc=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=Pyz1BNYoep3EVFcbxkqsZwJ15qIDdoMw1nXJjSmScl3xdPNHTFzE0v8KP19UhQjlGJXgjYnD+l8aonFg2GQ88sySrRUl2Dsy7W3EJERjBJUIjMvp8AZ6RNA8Kb1wSlBpYbdGD3eG0dnYXx/puVd6CfiRFSNpt6tQZoazqWJhnKQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44A21C4CEE9; Thu, 6 Mar 2025 18:18:24 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98) (envelope-from ) id 1tqFnd-00000000PGd-4Bej; Thu, 06 Mar 2025 13:18:26 -0500 Message-ID: <20250306181825.857105005@goodmis.org> User-Agent: quilt/0.68 Date: Thu, 06 Mar 2025 13:18:04 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Tomas Glozar , John Kacur , Luis Goncalves , Gabriele Monaco , Clark Williams Subject: [for-next][PATCH 03/10] rtla: Add optional dependency on BPF tooling References: <20250306181801.485766945@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Tomas Glozar If tooling required for building BPF CO-RE skeletons is present (that is, libbpf, clang with BPF CO-RE support, and bpftool), turn on HAVE_BPF_SKEL flag. Those requirements are similar to what perf requires, with the difference of using system libbpf and bpftool instead of in-tree versions. rtla can be forcefully built without BPF skeleton support by setting BUILD_BPF_SKEL=3D0 manually; in that case, a warning is displayed. Cc: John Kacur Cc: Luis Goncalves Cc: Gabriele Monaco Cc: Clark Williams Link: https://lore.kernel.org/20250218145859.27762-4-tglozar@redhat.com Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) --- tools/tracing/rtla/Makefile | 6 +++++ tools/tracing/rtla/Makefile.config | 42 ++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile index 8b5101457c70..0aa116f7b355 100644 --- a/tools/tracing/rtla/Makefile +++ b/tools/tracing/rtla/Makefile @@ -33,9 +33,15 @@ DOCSRC :=3D ../../../Documentation/tools/rtla/ FEATURE_TESTS :=3D libtraceevent FEATURE_TESTS +=3D libtracefs FEATURE_TESTS +=3D libcpupower +FEATURE_TESTS +=3D libbpf +FEATURE_TESTS +=3D clang-bpf-co-re +FEATURE_TESTS +=3D bpftool-skeletons FEATURE_DISPLAY :=3D libtraceevent FEATURE_DISPLAY +=3D libtracefs FEATURE_DISPLAY +=3D libcpupower +FEATURE_DISPLAY +=3D libbpf +FEATURE_DISPLAY +=3D clang-bpf-co-re +FEATURE_DISPLAY +=3D bpftool-skeletons =20 ifeq ($(V),1) Q =3D diff --git a/tools/tracing/rtla/Makefile.config b/tools/tracing/rtla/Makefi= le.config index 92a6e12e42d3..5f2231d8d626 100644 --- a/tools/tracing/rtla/Makefile.config +++ b/tools/tracing/rtla/Makefile.config @@ -53,6 +53,48 @@ else $(info Please install libcpupower-dev/kernel-tools-libs-devel) endif =20 +ifndef BUILD_BPF_SKEL + # BPF skeletons are used to implement improved sample collection, enable + # them by default. + BUILD_BPF_SKEL :=3D 1 +endif + +ifeq ($(BUILD_BPF_SKEL),0) + $(info BPF skeleton support disabled, building without BPF skeleton supp= ort.) +endif + +$(call feature_check,libbpf) +ifeq ($(feature-libbpf), 1) + $(call detected,CONFIG_LIBBPF) +else + $(info libbpf is missing, building without BPF skeleton support.) + $(info Please install libbpf-dev/libbpf-devel) + BUILD_BPF_SKEL :=3D 0 +endif + +$(call feature_check,clang-bpf-co-re) +ifeq ($(feature-clang-bpf-co-re), 1) + $(call detected,CONFIG_CLANG_BPF_CO_RE) +else + $(info clang is missing or does not support BPF CO-RE, building without = BPF skeleton support.) + $(info Please install clang) + BUILD_BPF_SKEL :=3D 0 +endif + +$(call feature_check,bpftool-skeletons) +ifeq ($(feature-bpftool-skeletons), 1) + $(call detected,CONFIG_BPFTOOL_SKELETONS) +else + $(info bpftool is missing or not supporting skeletons, building without = BPF skeleton support.) + $(info Please install bpftool) + BUILD_BPF_SKEL :=3D 0 +endif + +ifeq ($(BUILD_BPF_SKEL),1) + CFLAGS +=3D -DHAVE_BPF_SKEL + EXTLIBS +=3D -lbpf +endif + ifeq ($(STOP_ERROR),1) $(error Please, check the errors above.) endif --=20 2.47.2