Compare commits
6 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| f45a71a146 | |||
| 61fe30a3c7 | |||
| dcf3712f28 | |||
| 7ac267c847 | |||
| 43f677805d | |||
| add1a05acf |
@@ -0,0 +1,44 @@
|
||||
From f4a820bb1f6ed45bb314a6b1778ec8fe70f4facc Mon Sep 17 00:00:00 2001
|
||||
From: Hoyeon Lee <hoyeon.lee@suse.com>
|
||||
Date: Thu, 14 Aug 2025 14:45:20 +0900
|
||||
Subject: [PATCH] tools/filetop: fix DNAME_INLINE_LEN by folding to integer
|
||||
constant
|
||||
|
||||
Since Linux v6.14 (commit 61bc24ac974a), DNAME_INLINE_LEN is defined as
|
||||
an expression instead of a constant integer:
|
||||
|
||||
#define DNAME_INLINE_LEN (DNAME_INLINE_WORDS * sizeof(unsigned long))
|
||||
|
||||
This causes the name array in struct info_t to be shown in map metadata
|
||||
as ["name", "char""unsigned long", [40]] instead of the correct
|
||||
["name", "char", [40]], breaking dumping of the counts map.
|
||||
|
||||
Rather than modifying AST handling, fix by storing DNAME_INLINE_LEN in
|
||||
an enum constant after including kernel headers. Enum values are
|
||||
compile-time integer constants, so the expression is folded to a
|
||||
literal and no longer carries the sizeof() expression into the AST.
|
||||
|
||||
Closes: iovisor/bcc#5337
|
||||
Signed-off-by: Hoyeon Lee <hoyeon.lee@suse.com>
|
||||
---
|
||||
tools/filetop.py | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/tools/filetop.py b/tools/filetop.py
|
||||
index fda917ca..2c649bde 100755
|
||||
--- a/tools/filetop.py
|
||||
+++ b/tools/filetop.py
|
||||
@@ -70,6 +70,10 @@ bpf_text = """
|
||||
#include <uapi/linux/ptrace.h>
|
||||
#include <linux/blkdev.h>
|
||||
|
||||
+enum { __BCC_DNAME_INLINE_LEN = DNAME_INLINE_LEN };
|
||||
+#undef DNAME_INLINE_LEN
|
||||
+#define DNAME_INLINE_LEN __BCC_DNAME_INLINE_LEN
|
||||
+
|
||||
// the key for the output summary
|
||||
struct info_t {
|
||||
unsigned long inode;
|
||||
--
|
||||
2.50.1
|
||||
|
||||
13
_constraints
Normal file
13
_constraints
Normal file
@@ -0,0 +1,13 @@
|
||||
<constraints>
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>ppc64le</arch>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<memory>
|
||||
<size unit="G">8</size>
|
||||
</memory>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
</constraints>
|
||||
|
||||
2
bcc-rpmlintrc
Normal file
2
bcc-rpmlintrc
Normal file
@@ -0,0 +1,2 @@
|
||||
# some bcc-tools uses /usr/share/bcc/tools/*.c for compilation at runtime, so must be shipped as-is.
|
||||
addFilter("devel-file-in-non-devel-package /usr/share/bcc/tools/.*\.c")
|
||||
21
bcc.changes
21
bcc.changes
@@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 24 01:59:23 UTC 2025 - Hoyeon Lee <hoyeon.lee@suse.com>
|
||||
|
||||
- Add libbpf-tools subpackage
|
||||
- tools are prefixed with 'bpf-' (iovisor/bcc#3263)
|
||||
- disabled for unsupported AArch32/IA-32 variant
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 25 16:14:11 UTC 2025 - Hoyeon Lee <hoyeon.lee@suse.com>
|
||||
|
||||
- Add _constraints to avoid OOM on OBS workers (bsc#1248638)
|
||||
- Add rpmlintrc to suppress rpmlint warnings
|
||||
* some bcc-tools uses /usr/share/bcc/tools/*.c for compilation at runtime,
|
||||
so must be shipped as-is.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 19 07:31:59 UTC 2025 - Hoyeon Lee <hoyeon.lee@suse.com>
|
||||
|
||||
- tools/filetop: fix script failing after kernel 6.14 update (bsc#1240644)
|
||||
* Add 0001-tools-filetop-fix-DNAME_INLINE_LEN-by-folding-to-int.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 10 06:20:23 UTC 2025 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
|
||||
51
bcc.spec
51
bcc.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package bcc
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -52,6 +52,12 @@
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%ifarch %arm %ix86
|
||||
%{!?with_libbpf_tools: %global with_libbpf_tools 0}
|
||||
%else
|
||||
%{!?with_libbpf_tools: %global with_libbpf_tools 1}
|
||||
%endif
|
||||
|
||||
Name: bcc
|
||||
Version: 0.35.0
|
||||
Release: 0
|
||||
@@ -60,6 +66,8 @@ License: Apache-2.0
|
||||
Group: Development/Tools/Other
|
||||
URL: https://github.com/iovisor/bcc
|
||||
Source: https://github.com/iovisor/bcc/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source100: bcc-rpmlintrc
|
||||
Patch0: 0001-tools-filetop-fix-DNAME_INLINE_LEN-by-folding-to-int.patch
|
||||
ExcludeArch: ppc s390
|
||||
BuildRequires: bison
|
||||
BuildRequires: cmake >= 2.8.7
|
||||
@@ -158,6 +166,16 @@ BuildArch: noarch
|
||||
%description docs
|
||||
Documentation on how to write programs with the BPF Compiler Collection.
|
||||
|
||||
%if %{with_libbpf_tools}
|
||||
%package -n libbpf-tools
|
||||
Summary: Tracing libbpf tools from the BPF Compiler Collection
|
||||
BuildRequires: bpftool
|
||||
BuildRequires: libbpf-devel-static
|
||||
|
||||
%description -n libbpf-tools
|
||||
libbpf-driven eBPF tracing tools from the BPF Compiler Collection
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
@@ -209,6 +227,14 @@ find tools/ examples/ -type f -exec \
|
||||
find tools/ examples/ -type f -exec \
|
||||
sed -i '1s|/bin/python$|/bin/python3|g' {} +
|
||||
|
||||
%if %{with_libbpf_tools}
|
||||
pushd libbpf-tools
|
||||
%make_build LIBBPF_OBJ=%{_libdir}/libbpf.a \
|
||||
BPFTOOL=%{_sbindir}/bpftool \
|
||||
CFLAGS="%{optflags}"
|
||||
popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
pushd build
|
||||
%make_install
|
||||
@@ -220,6 +246,24 @@ rm -f %{buildroot}/%{_bindir}/bps
|
||||
|
||||
popd
|
||||
|
||||
%if %{with_libbpf_tools}
|
||||
pushd libbpf-tools
|
||||
# package libbpf-tools with 'bpf-' prefix (iovisor/bcc#3263)
|
||||
%make_install bindir=%{_sbindir}
|
||||
(
|
||||
cd %{buildroot}/%{_sbindir}
|
||||
for file in *; do
|
||||
mv $file bpf-$file
|
||||
done
|
||||
# some are symlinks, update them too
|
||||
for file in `find . -type l`; do
|
||||
dest=$(readlink "$file")
|
||||
ln -s -f bpf-$dest $file
|
||||
done
|
||||
)
|
||||
popd
|
||||
%endif
|
||||
|
||||
# Remove the static libraries
|
||||
rm -f %{buildroot}/%{_libdir}/libbcc*.a
|
||||
|
||||
@@ -267,4 +311,9 @@ rm -f %{buildroot}/%{_libdir}/libbcc*.a
|
||||
%doc docs/kernel-versions.md docs/reference_guide.md
|
||||
%doc docs/tutorial_bcc_python_developer.md docs/tutorial.md
|
||||
|
||||
%if %{with_libbpf_tools}
|
||||
%files -n libbpf-tools
|
||||
%{_sbindir}/bpf-*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user