Import from AlmaLinux stable repository
This commit is contained in:
parent
ecb4a0d6f4
commit
d9d5211173
|
@ -1 +1 @@
|
|||
SOURCES/rtla-5.14.0.tar.bz2
|
||||
SOURCES/rtla-6.6.0.tar.bz2
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
8ccc1f0b78be8930011665995ba8851afe92b569 SOURCES/rtla-5.14.0.tar.bz2
|
|
@ -1,155 +0,0 @@
|
|||
From 4c6874374859d89aa6a75019bb0a913369e472c9 Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Mon, 7 Nov 2022 09:43:13 -0500
|
||||
Subject: [PATCH] rtla: Fix exit status when returning from calls to usage()
|
||||
|
||||
rtla_usage(), osnoise_usage() and timerlat_usage() all exit with an
|
||||
error status.
|
||||
|
||||
However when these are called from help, they should exit with a
|
||||
non-error status.
|
||||
|
||||
Fix this by passing the exit status to the functions.
|
||||
|
||||
Note, although we remove the subsequent call to exit after calling
|
||||
usage, we leave it in at the end of a function to suppress the compiler
|
||||
warning "control reaches end of a non-void function".
|
||||
|
||||
Link: https://lkml.kernel.org/r/20221107144313.22470-1-jkacur@redhat.com
|
||||
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>
|
||||
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
|
||||
---
|
||||
src/osnoise.c | 9 ++++-----
|
||||
src/rtla.c | 12 +++++-------
|
||||
src/timerlat.c | 9 ++++-----
|
||||
3 files changed, 13 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/src/osnoise.c b/src/osnoise.c
|
||||
index b8ec6c15bccb..4dee343909b1 100644
|
||||
--- a/src/osnoise.c
|
||||
+++ b/src/osnoise.c
|
||||
@@ -903,7 +903,7 @@ struct osnoise_tool *osnoise_init_trace_tool(char *tracer)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-static void osnoise_usage(void)
|
||||
+static void osnoise_usage(int err)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -923,7 +923,7 @@ static void osnoise_usage(void)
|
||||
|
||||
for (i = 0; msg[i]; i++)
|
||||
fprintf(stderr, "%s\n", msg[i]);
|
||||
- exit(1);
|
||||
+ exit(err);
|
||||
}
|
||||
|
||||
int osnoise_main(int argc, char *argv[])
|
||||
@@ -941,8 +941,7 @@ int osnoise_main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0)) {
|
||||
- osnoise_usage();
|
||||
- exit(0);
|
||||
+ osnoise_usage(0);
|
||||
} else if (strncmp(argv[1], "-", 1) == 0) {
|
||||
/* the user skipped the tool, call the default one */
|
||||
osnoise_top_main(argc, argv);
|
||||
@@ -956,6 +955,6 @@ int osnoise_main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
usage:
|
||||
- osnoise_usage();
|
||||
+ osnoise_usage(1);
|
||||
exit(1);
|
||||
}
|
||||
diff --git a/src/rtla.c b/src/rtla.c
|
||||
index 09bd21b8af81..52e8f1825281 100644
|
||||
--- a/src/rtla.c
|
||||
+++ b/src/rtla.c
|
||||
@@ -14,7 +14,7 @@
|
||||
/*
|
||||
* rtla_usage - print rtla usage
|
||||
*/
|
||||
-static void rtla_usage(void)
|
||||
+static void rtla_usage(int err)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -33,7 +33,7 @@ static void rtla_usage(void)
|
||||
|
||||
for (i = 0; msg[i]; i++)
|
||||
fprintf(stderr, "%s\n", msg[i]);
|
||||
- exit(1);
|
||||
+ exit(err);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -70,11 +70,9 @@ int main(int argc, char *argv[])
|
||||
goto usage;
|
||||
|
||||
if (strcmp(argv[1], "-h") == 0) {
|
||||
- rtla_usage();
|
||||
- exit(0);
|
||||
+ rtla_usage(0);
|
||||
} else if (strcmp(argv[1], "--help") == 0) {
|
||||
- rtla_usage();
|
||||
- exit(0);
|
||||
+ rtla_usage(0);
|
||||
}
|
||||
|
||||
retval = run_command(argc, argv, 1);
|
||||
@@ -82,6 +80,6 @@ int main(int argc, char *argv[])
|
||||
exit(0);
|
||||
|
||||
usage:
|
||||
- rtla_usage();
|
||||
+ rtla_usage(1);
|
||||
exit(1);
|
||||
}
|
||||
diff --git a/src/timerlat.c b/src/timerlat.c
|
||||
index 97abbf494fee..21cdcc5c4a29 100644
|
||||
--- a/src/timerlat.c
|
||||
+++ b/src/timerlat.c
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "timerlat.h"
|
||||
|
||||
-static void timerlat_usage(void)
|
||||
+static void timerlat_usage(int err)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -34,7 +34,7 @@ static void timerlat_usage(void)
|
||||
|
||||
for (i = 0; msg[i]; i++)
|
||||
fprintf(stderr, "%s\n", msg[i]);
|
||||
- exit(1);
|
||||
+ exit(err);
|
||||
}
|
||||
|
||||
int timerlat_main(int argc, char *argv[])
|
||||
@@ -52,8 +52,7 @@ int timerlat_main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0)) {
|
||||
- timerlat_usage();
|
||||
- exit(0);
|
||||
+ timerlat_usage(0);
|
||||
} else if (strncmp(argv[1], "-", 1) == 0) {
|
||||
/* the user skipped the tool, call the default one */
|
||||
timerlat_top_main(argc, argv);
|
||||
@@ -67,6 +66,6 @@ int timerlat_main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
usage:
|
||||
- timerlat_usage();
|
||||
+ timerlat_usage(1);
|
||||
exit(1);
|
||||
}
|
||||
--
|
||||
2.39.0
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From 696444a544ecd6d62c1edc89516b376cefb28929 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.i.king@gmail.com>
|
||||
Date: Thu, 27 Jul 2023 16:01:17 +0100
|
||||
Subject: [PATCH] rtla: Fix uninitialized variable found
|
||||
|
||||
Variable found is not being initialized, in the case where the desired
|
||||
mount is not found the variable contains garbage. Fix this by initializing
|
||||
it to zero.
|
||||
|
||||
Link: https://lore.kernel.org/all/20230727150117.627730-1-colin.i.king@gmail.com/
|
||||
|
||||
Fixes: a957cbc02531 ("rtla: Add -C cgroup support")
|
||||
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
|
||||
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
|
||||
---
|
||||
src/utils.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/utils.c b/src/utils.c
|
||||
index 623a38908ed5..c769d7b3842c 100644
|
||||
--- a/src/utils.c
|
||||
+++ b/src/utils.c
|
||||
@@ -538,7 +538,7 @@ static const int find_mount(const char *fs, char *mp, int sizeof_mp)
|
||||
{
|
||||
char mount_point[MAX_PATH];
|
||||
char type[100];
|
||||
- int found;
|
||||
+ int found = 0;
|
||||
FILE *fp;
|
||||
|
||||
fp = fopen("/proc/mounts", "r");
|
||||
--
|
||||
2.42.0
|
||||
|
|
@ -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
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
Name: rtla
|
||||
Version: 5.14.0
|
||||
Release: 4%{?dist}
|
||||
Version: 6.6.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Real-Time Linux Analysis tools
|
||||
|
||||
License: GPLv2
|
||||
|
@ -8,7 +8,7 @@ URL: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
|
|||
# The Source0 rtla-5.14.0.tar.bz2 file was created from git
|
||||
# tag kernel-5.14.0-204.el9
|
||||
# and from the tools/tracing/rtla directory issuing make tarball
|
||||
Source0: rtla-5.14.0.tar.bz2
|
||||
Source0: rtla-6.6.0.tar.bz2
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: python3-docutils
|
||||
|
@ -18,7 +18,8 @@ Requires: libtraceevent >= 1.5.3
|
|||
Requires: libtracefs >= 1.3.1
|
||||
|
||||
# Patches
|
||||
Patch1: rtla-Fix-exit-status-when-returning-from-calls-to-usage.patch
|
||||
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
|
||||
|
@ -62,9 +64,35 @@ make DESTDIR=%{buildroot} -C Documentation install
|
|||
%{_mandir}/man1/rtla-timerlat-top.1.gz
|
||||
%{_mandir}/man1/rtla-timerlat.1.gz
|
||||
%{_mandir}/man1/rtla.1.gz
|
||||
%{_mandir}/man1/rtla-hwnoise.1.gz
|
||||
|
||||
|
||||
%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
|
||||
- Add rtla hwnoise
|
||||
Resolves: bz2175295
|
||||
jiraProject == RHELPLAN-150659
|
||||
|
||||
* Fri Jul 14 2023 John Kacur <jkacur@redhat.com> - 5.14.0-7
|
||||
- Add rtla timerlat auto analysis
|
||||
Resolves: rhbz#2175292
|
||||
jiraProject == RHELPLAN-150657
|
||||
|
||||
* Tue May 09 2023 John Kacur <jkacur@redhat.com> - 5.14.0-6
|
||||
- Forward port the tests directory for ci testing
|
||||
Resolves: rhbz#2196611
|
||||
jiraProject == RHELPLAN-156801
|
||||
|
||||
* Fri May 05 2023 John Kacur <jkacur@redhat.com> - 5.14.0-5
|
||||
- Correct commandline example
|
||||
Resolves: rhbz#2189440
|
||||
jiraProject == RHELPLAN-155623
|
||||
|
||||
* Thu Jan 26 2023 John Kacur <jkacur@redhat.com> - 5.14.0-4
|
||||
- Add a gating test for rtla
|
||||
Resolves: rhbz#2164877
|
||||
|
|
Loading…
Reference in New Issue