import bpftrace-0.12.1-5.el9
This commit is contained in:
parent
71470d9187
commit
64cd8a21a2
26
SOURCES/bpftrace-0.12.1-Fix-mdflush.patch
Normal file
26
SOURCES/bpftrace-0.12.1-Fix-mdflush.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 7453a97005fda29f0b7be8f257736a19d7c13dbe Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Marchand <jmarchan@redhat.com>
|
||||
Date: Fri, 15 Oct 2021 14:26:28 +0200
|
||||
Subject: [PATCH] Fix mdflush
|
||||
|
||||
Since kernel commit 309dca309fc ("block: store a block_device pointer
|
||||
in struct bio") struct bio points again to a block_device and not to a
|
||||
gendisk directly.
|
||||
---
|
||||
tools/mdflush.bt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/mdflush.bt b/tools/mdflush.bt
|
||||
index e767b81d..541abba1 100755
|
||||
--- a/tools/mdflush.bt
|
||||
+++ b/tools/mdflush.bt
|
||||
@@ -26,5 +26,5 @@ kprobe:md_flush_request
|
||||
{
|
||||
time("%H:%M:%S ");
|
||||
printf("%-6d %-16s %s\n", pid, comm,
|
||||
- ((struct bio *)arg1)->bi_disk->disk_name);
|
||||
+ ((struct bio *)arg1)->bi_bdev->bd_disk->disk_name);
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
|
@ -47,7 +47,7 @@ index 3824bc6d..bdc6e4df 100755
|
||||
}
|
||||
|
||||
-uprobe:/lib/x86_64-linux-gnu/libpthread.so.0:pthread_create
|
||||
+uprobe:/usr/lib64/libpthread.so:pthread_create
|
||||
+uprobe:/usr/lib64/libpthread.so.0:pthread_create
|
||||
{
|
||||
printf("%-10u %-6d %-16s %s\n", elapsed / 1e6, pid, comm,
|
||||
usym(arg2));
|
||||
|
@ -0,0 +1,64 @@
|
||||
From 69f6d7ff04f43451eea2fb028a84a76331bbf6ea Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Marchand <jmarchan@redhat.com>
|
||||
Date: Thu, 11 Jun 2020 14:56:36 +0200
|
||||
Subject: [PATCH] RHEL-8: aarch64: fixes statsnoop and opensnoop
|
||||
|
||||
On aarch64 the open syscall has been dropped. Only openat remains,
|
||||
wich is called by libc open() function.
|
||||
|
||||
The state of *stat* syscalls, is a mess. They are several generations
|
||||
of the system calls, and not all arches provides all of them. For
|
||||
instance, new(l)stat are missing from aarch64.
|
||||
|
||||
The only way I can think of fixing thess is RHEL-8 only arch specific
|
||||
patches.
|
||||
---
|
||||
tools/opensnoop.bt | 2 --
|
||||
tools/statsnoop.bt | 8 ++------
|
||||
2 files changed, 2 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/tools/opensnoop.bt b/tools/opensnoop.bt
|
||||
index a7de8026..d99db93e 100755
|
||||
--- a/tools/opensnoop.bt
|
||||
+++ b/tools/opensnoop.bt
|
||||
@@ -21,13 +21,11 @@ BEGIN
|
||||
printf("%-6s %-16s %4s %3s %s\n", "PID", "COMM", "FD", "ERR", "PATH");
|
||||
}
|
||||
|
||||
-tracepoint:syscalls:sys_enter_open,
|
||||
tracepoint:syscalls:sys_enter_openat
|
||||
{
|
||||
@filename[tid] = args->filename;
|
||||
}
|
||||
|
||||
-tracepoint:syscalls:sys_exit_open,
|
||||
tracepoint:syscalls:sys_exit_openat
|
||||
/@filename[tid]/
|
||||
{
|
||||
diff --git a/tools/statsnoop.bt b/tools/statsnoop.bt
|
||||
index b2d529e2..f612ea94 100755
|
||||
--- a/tools/statsnoop.bt
|
||||
+++ b/tools/statsnoop.bt
|
||||
@@ -30,17 +30,13 @@ tracepoint:syscalls:sys_enter_statfs
|
||||
@filename[tid] = args->pathname;
|
||||
}
|
||||
|
||||
-tracepoint:syscalls:sys_enter_statx,
|
||||
-tracepoint:syscalls:sys_enter_newstat,
|
||||
-tracepoint:syscalls:sys_enter_newlstat
|
||||
+tracepoint:syscalls:sys_enter_statx
|
||||
{
|
||||
@filename[tid] = args->filename;
|
||||
}
|
||||
|
||||
tracepoint:syscalls:sys_exit_statfs,
|
||||
-tracepoint:syscalls:sys_exit_statx,
|
||||
-tracepoint:syscalls:sys_exit_newstat,
|
||||
-tracepoint:syscalls:sys_exit_newlstat
|
||||
+tracepoint:syscalls:sys_exit_statx
|
||||
/@filename[tid]/
|
||||
{
|
||||
$ret = args->ret;
|
||||
--
|
||||
2.30.2
|
||||
|
@ -1,12 +1,15 @@
|
||||
Name: bpftrace
|
||||
Version: 0.12.1
|
||||
Release: 2%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: High-level tracing language for Linux eBPF
|
||||
License: ASL 2.0
|
||||
|
||||
URL: https://github.com/iovisor/bpftrace
|
||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0: %{name}-%{version}-RHEL-9-fixes.patch
|
||||
Patch1: %{name}-%{version}-Fix-mdflush.patch
|
||||
|
||||
Patch10: %{name}-%{version}-aarch64-fixes-statsnoop-and-opensnoop.patch
|
||||
|
||||
# Arches will be included as upstream support is added and dependencies are
|
||||
# satisfied in the respective arches
|
||||
@ -37,8 +40,12 @@ and predecessor tracers such as DTrace and SystemTap
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%autosetup -N
|
||||
%autopatch -p1 -M 9
|
||||
|
||||
%ifarch aarch64
|
||||
%patch10 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
%cmake . \
|
||||
@ -74,8 +81,17 @@ find %{buildroot}%{_datadir}/%{name}/tools -type f -exec \
|
||||
%attr(0755,-,-) %{_datadir}/%{name}/tools/*.bt
|
||||
%{_datadir}/%{name}/tools/doc/*.txt
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Oct 18 2021 Jerome Marchand <jmarchan@redhat.com> - 0.12.1.5
|
||||
- threadsnoop: probe libpthread.so.0
|
||||
- Fix aarch64 failures
|
||||
|
||||
* Mon Oct 18 2021 Jerome Marchand <jmarchan@redhat.com> - 0.12.1.4
|
||||
- Fix gating
|
||||
|
||||
* Fri Oct 15 2021 Jerome Marchand <jmarchan@redhat.com> - 0.12.1-3
|
||||
- Fix mdflush (rhbz#1967567)
|
||||
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.12.1-2
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
Loading…
Reference in New Issue
Block a user