Rebase bcc to version 0.34.0
Rebase to version 0.34.0 (RHEL-78920) which also fix the following: - Fix bpf-klockstat on aarch64 and ppc64le (RHEL-78619) Also include the following fixes: - Rebuild with LLVM 20 (RHEL-81773) - Fix biosnoop pattern option (RHEL-90848) - Remove unsupported bpf-bcachefs* and bpf-zfs* tools (RHEL-78166) - Remove unsupported slaratetop tool (RHEL-78162) Resolves: RHEL-78920 Resolves: RHEL-78619 Resolves: RHEL-81773 Resolves: RHEL-90848 Resolves: RHEL-78166 Resolves: RHEL-78162 Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
This commit is contained in:
parent
57619e5883
commit
5884d2f569
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,3 +20,4 @@
|
||||
/bcc-0.28.0.tar.gz
|
||||
/bcc-0.30.0.tar.gz
|
||||
/bcc-0.32.0.tar.gz
|
||||
/bcc-0.34.0.tar.gz
|
||||
|
||||
@ -0,0 +1,70 @@
|
||||
From 06d96cee7d9f4d95025ac0988ac3b273ead0061e Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Marchand <jmarchan@redhat.com>
|
||||
Date: Sun, 18 May 2025 01:12:30 +0200
|
||||
Subject: [PATCH] tools/biosnoop: Fix biosnoop pattern option (#5304)
|
||||
|
||||
The code to support the block_io tracepoints failed to update some
|
||||
code that is used with the -P option. That code changed the second
|
||||
argument of __trace_req_completion from 'req' to 'key', but in the
|
||||
"#ifdef INCLUDE_PATTERN" block, the use of 'req' remained unchanged.
|
||||
Of course, 'key' should be use here too.
|
||||
|
||||
Also remove the commented out line of code related to rq_disk.
|
||||
|
||||
It fixes the following error:
|
||||
$ biosnoop -P
|
||||
/virtual/main.c:213:24: error: use of undeclared identifier 'req'
|
||||
213 | data.pattern = req->__sector == *sector ? SEQUENTIAL : RANDOM;
|
||||
| ^
|
||||
/virtual/main.c:216:19: error: use of undeclared identifier 'req'
|
||||
216 | last_sector = req->__sector + data.len / 512;
|
||||
| ^
|
||||
2 errors generated.
|
||||
Traceback (most recent call last):
|
||||
File "/usr/share/bcc/tools/biosnoop", line 335, in <module>
|
||||
b = BPF(text=bpf_text)
|
||||
File "/usr/lib/python3.13/site-packages/bcc/__init__.py", line 505, in __init__
|
||||
raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))
|
||||
Exception: Failed to compile BPF module <text>
|
||||
|
||||
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
|
||||
---
|
||||
tools/biosnoop.py | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tools/biosnoop.py b/tools/biosnoop.py
|
||||
index 431cd4a2..045e1f9d 100755
|
||||
--- a/tools/biosnoop.py
|
||||
+++ b/tools/biosnoop.py
|
||||
@@ -218,7 +218,6 @@ static int __trace_req_completion(void *ctx, struct hash_key key)
|
||||
struct start_req_t *startp;
|
||||
struct val_t *valp;
|
||||
struct data_t data = {};
|
||||
- //struct gendisk *rq_disk;
|
||||
u64 ts;
|
||||
|
||||
// fetch timestamp and calculate delta
|
||||
@@ -228,7 +227,6 @@ static int __trace_req_completion(void *ctx, struct hash_key key)
|
||||
return 0;
|
||||
}
|
||||
ts = bpf_ktime_get_ns();
|
||||
- //rq_disk = req->__RQ_DISK__;
|
||||
data.delta = ts - startp->ts;
|
||||
data.ts = ts / 1000;
|
||||
data.qdelta = 0;
|
||||
@@ -260,10 +258,10 @@ static int __trace_req_completion(void *ctx, struct hash_key key)
|
||||
|
||||
sector = last_sectors.lookup(§or_key);
|
||||
if (sector != 0) {
|
||||
- data.pattern = req->__sector == *sector ? SEQUENTIAL : RANDOM;
|
||||
+ data.pattern = key.sector == *sector ? SEQUENTIAL : RANDOM;
|
||||
}
|
||||
|
||||
- last_sector = req->__sector + data.len / 512;
|
||||
+ last_sector = key.sector + data.len / 512;
|
||||
last_sectors.update(§or_key, &last_sector);
|
||||
#endif
|
||||
|
||||
--
|
||||
2.49.0
|
||||
|
||||
21
bcc.spec
21
bcc.spec
@ -24,13 +24,14 @@
|
||||
|
||||
|
||||
Name: bcc
|
||||
Version: 0.32.0
|
||||
Release: 2%{?dist}
|
||||
Version: 0.34.0
|
||||
Release: 1%{?dist}
|
||||
Summary: BPF Compiler Collection (BCC)
|
||||
License: ASL 2.0
|
||||
URL: https://github.com/iovisor/bcc
|
||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0: %%{name}-%%{version}-RHEL-Centos-tools-fix-alignment-in-tp_args-for-bio-t.patch
|
||||
Patch1: %%{name}-%%{version}-tools-biosnoop-Fix-biosnoop-pattern-option-5304.patch
|
||||
|
||||
|
||||
# Arches will be included as upstream support is added and dependencies are
|
||||
@ -244,6 +245,10 @@ cp -a libbpf-tools/tmp-install/bin/* %{buildroot}/%{_sbindir}/
|
||||
%exclude %{_datadir}/%{name}/tools/criticalstat
|
||||
%exclude %{_datadir}/%{name}/tools/doc/criticalstat_example.txt
|
||||
%exclude %{_mandir}/man8/bcc-criticalstat.8.gz
|
||||
# slabratetop isn't supported on RHEL 9 kernel anymore
|
||||
%exclude %{_datadir}/%{name}/tools/slabratetop
|
||||
%exclude %{_datadir}/%{name}/tools/doc/slabratetop_example.txt
|
||||
%exclude %{_mandir}/man8/bcc-slabratetop.8.gz
|
||||
%endif
|
||||
%{_mandir}/man8/*
|
||||
|
||||
@ -257,13 +262,23 @@ cp -a libbpf-tools/tmp-install/bin/* %{buildroot}/%{_sbindir}/
|
||||
%ifarch s390x
|
||||
%exclude %{_sbindir}/bpf-numamove
|
||||
%endif
|
||||
# RHEL doesn't provide btrfs or f2fs
|
||||
# RHEL doesn't provide btrfs, f2fs bcachefs or zfs
|
||||
%exclude %{_sbindir}/bpf-btrfs*
|
||||
%exclude %{_sbindir}/bpf-f2fs*
|
||||
%exclude %{_sbindir}/bpf-bcachefs*
|
||||
%exclude %{_sbindir}/bpf-zfs*
|
||||
%{_sbindir}/bpf-*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Jun 04 2025 Jerome Marchand <jmarchan@redhat.com> - 0.34.0-1
|
||||
- Rebase to version 0.34.0 (RHEL-78920)
|
||||
- Rebuild with LLVM 20 (RHEL-81773)
|
||||
- Fix biosnoop pattern option (RHEL-90848)
|
||||
- Fix bpf-klockstat on aarch64 and ppc64le (RHEL-78619)
|
||||
- Remove unsupported bpf-bcachefs* and bpf-zfs* tools (RHEL-78166)
|
||||
- Remove unsupported slaratetop tool (RHEL-78162)
|
||||
|
||||
* Wed Jan 29 2025 Jerome Marchand <jmarchan@redhat.com> - 0.32.0-1
|
||||
- Rebuild with libbpf 1.5.0
|
||||
|
||||
|
||||
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (bcc-0.32.0.tar.gz) = 3612580976f9c91a52c49bc83abdbaccc9a066c30a7f178997cb91910307e48743d831ec028e0099e776250770b55e8fc8c937bcc9b1e36fbec88370376d1df4
|
||||
SHA512 (bcc-0.34.0.tar.gz) = 0bcc00f2f94d2b835a0e421a029d30030324a839070c14da7fe56cd11ce246b7655dae42facb802d79c40325d5b98d5648b34189026c98cdcc6a1f094f795391
|
||||
|
||||
Loading…
Reference in New Issue
Block a user