Update to rtla in linux-6.6.0
Add patch to use SYS_gettid and add -lpthread to the Makefile Resolves: RHEL-10081 Signed-off-by: John Kacur <jkacur@redhat.com>
This commit is contained in:
parent
56f401026c
commit
c23eab3879
50
rtla-Use-SYS_gettid-for-gettid.patch
Normal file
50
rtla-Use-SYS_gettid-for-gettid.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From 07ad224f2416e7c9411fd095fef148c67011eb49 Mon Sep 17 00:00:00 2001
|
||||
From: root <root@hpe-dl160gen8-01.hpe2.lab.eng.bos.redhat.com>
|
||||
Date: Wed, 20 Dec 2023 13:08:28 -0500
|
||||
Subject: [PATCH] rtla: Use SYS_gettid for gettid
|
||||
|
||||
Use SYS_gettid for gettid since gittid is not available in the version
|
||||
of glibc in rhel8.x
|
||||
|
||||
Also add the -lpthread to the flags in the Makefile for
|
||||
pthread_setname_np
|
||||
|
||||
Signed-off-by: root <root@hpe-dl160gen8-01.hpe2.lab.eng.bos.redhat.com>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
src/timerlat_u.c | 6 ++++++
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 2456a399eb9a..db85545e9ec1 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -32,7 +32,7 @@ TRACEFS_HEADERS := $$($(PKG_CONFIG) --cflags libtracefs)
|
||||
|
||||
CFLAGS := -O -g -DVERSION=\"$(VERSION)\" $(FOPTS) $(MOPTS) $(WOPTS) $(TRACEFS_HEADERS) $(EXTRA_CFLAGS)
|
||||
LDFLAGS := -ggdb $(EXTRA_LDFLAGS)
|
||||
-LIBS := $$($(PKG_CONFIG) --libs libtracefs)
|
||||
+LIBS := $$($(PKG_CONFIG) --libs libtracefs) -lpthread
|
||||
|
||||
SRC := $(wildcard src/*.c)
|
||||
HDR := $(wildcard src/*.h)
|
||||
diff --git a/src/timerlat_u.c b/src/timerlat_u.c
|
||||
index 01dbf9a6b5a5..e8d0ec92c8d2 100644
|
||||
--- a/src/timerlat_u.c
|
||||
+++ b/src/timerlat_u.c
|
||||
@@ -16,6 +16,12 @@
|
||||
#include <sys/wait.h>
|
||||
#include <sys/prctl.h>
|
||||
|
||||
+#include <sys/syscall.h>
|
||||
+#ifndef SYS_gettid
|
||||
+#error "SYS_gettid unavailable"
|
||||
+#endif
|
||||
+#define gettid() ((pid_t)syscall(SYS_gettid))
|
||||
+
|
||||
#include "utils.h"
|
||||
#include "timerlat_u.h"
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
@ -19,6 +19,7 @@ Requires: libtracefs >= 1.3.1
|
||||
|
||||
# Patches
|
||||
Patch01: rtla-Fix-uninitialized-variable-found.patch
|
||||
Patch02: rtla-Use-SYS_gettid-for-gettid.patch
|
||||
|
||||
%description
|
||||
The rtla meta-tool includes a set of commands that aims to analyze
|
||||
@ -30,6 +31,7 @@ about the properties and root causes of unexpected results.
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
|
||||
%build
|
||||
@ -68,6 +70,7 @@ make DESTDIR=%{buildroot} -C Documentation install
|
||||
%changelog
|
||||
* Mon Dec 18 2023 John Kacur <jkacur@redhat.com> - 6.6.0-1
|
||||
Update to rtla in linux-6.6.0
|
||||
- Add patch to use SYS_gettid and add -lpthread to the Makefile
|
||||
Resolves: RHEL-10081
|
||||
|
||||
* Fri Jul 14 2023 John Kacur <jkacur@redhat.com> - 5.14.0-8
|
||||
|
Loading…
Reference in New Issue
Block a user