diff --git a/backport-Remove-unneeded-multiply-in-events-timesta.patch b/backport-Remove-unneeded-multiply-in-events-timesta.patch new file mode 100644 index 0000000000000000000000000000000000000000..017e992660e45fbfb1ca0a74bbfc5363773d6e54 --- /dev/null +++ b/backport-Remove-unneeded-multiply-in-events-timesta.patch @@ -0,0 +1,38 @@ +From 43fa39ef1717e98ffe71ab0b53fefdfe1f02be3d Mon Sep 17 00:00:00 2001 +From: "Tzvetomir Stoyanov (VMware)" +Date: Thu, 25 Mar 2021 08:40:44 +0200 +Subject: [PATCH] trace-cmd: Remove unneeded multiply in events timestamp + reading + +When the event timestamp is converted to seconds, the local variable +that holds this timestamp is converted to seconds also. As this +variable is not used in the function later, this conversion in not +needed. + +Link: https://lore.kernel.org/linux-trace-devel/20210325064055.539554-13-tz.stoyanov@gmail.com + +Signed-off-by: Tzvetomir Stoyanov (VMware) +Signed-off-by: Steven Rostedt (VMware) +--- + lib/trace-cmd/trace-input.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c +index c1ea07fd..c4fb9639 100644 +--- a/lib/trace-cmd/trace-input.c ++++ b/lib/trace-cmd/trace-input.c +@@ -1932,10 +1932,8 @@ read_again: + + handle->cpu_data[cpu].timestamp = timestamp_correct(ts, handle); + +- if (handle->ts2secs) { ++ if (handle->ts2secs) + handle->cpu_data[cpu].timestamp *= handle->ts2secs; +- ts *= handle->ts2secs; +- } + + index = kbuffer_curr_offset(kbuf); + +-- +2.33.0 + diff --git a/trace-cmd.spec b/trace-cmd.spec index 8ad71d1dc39aa3f22e1e8a47adbe9be73d2c0d59..dfebc9498f9a30a917ac75ef92cf983420c8a8c0 100644 --- a/trace-cmd.spec +++ b/trace-cmd.spec @@ -1,6 +1,6 @@ Name: trace-cmd Version: 2.9.2 -Release: 6 +Release: 7 Summary: A front-end for Ftrace License: GPLv2 and LGPLv2 URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary @@ -10,6 +10,7 @@ Source1: kernelshark.desktop Patch0001: backport-trace-cmd-report-Fix-typos-in-error-messages.patch Patch0002: backport-trace-cmd-library-Fix-version-string-memory-leak.patch Patch0003: backport-trace-cmd-library-Fixed-a-memory-leak-on-input-handl.patch +Patch0004: backport-Remove-unneeded-multiply-in-events-timesta.patch BuildRequires: gcc xmlto asciidoc mlocate libxml2-devel chrpath BuildRequires: gtk2-devel glib2-devel desktop-file-utils libtraceevent-devel @@ -69,6 +70,9 @@ echo "%{_bindir}/%{name}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.co %{_mandir}/man5/* %changelog +* Sat Jan 07 2023 Bolehu - 2.9.2-7 +- Remove unneeded multiply in events timestamp reading + * Fri Jan 06 2023 Bolehu - 2.9.2-6 - trace-cmd library: Fixed a memory leak on input handler close