diff --git a/backport-Changing-default-install-path-of-plugins.patch b/backport-Changing-default-install-path-of-plugins.patch new file mode 100644 index 0000000000000000000000000000000000000000..31ddfd368688cf270d9156d12d89bd3507fc0297 --- /dev/null +++ b/backport-Changing-default-install-path-of-plugins.patch @@ -0,0 +1,33 @@ +From 67b2de06ccd249f2b0dcc9b3e196e4fbcb943066 Mon Sep 17 00:00:00 2001 +From: Peter Bergin +Date: Fri, 30 Apr 2021 17:24:30 +0200 +Subject: [PATCH] trace-cmd: Changing default install path of plugins + +README file states that default install path for plugins +is '/usr/local/lib/trace-cmd/plugins' but Makefile did +specify other location. + +Link: https://lore.kernel.org/linux-trace-devel/20210430152430.1958285-1-peter@berginkonsult.se + +Signed-off-by: Peter Bergin +Signed-off-by: Steven Rostedt (VMware) +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index ec73b5c6..0d8fea0d 100644 +--- a/Makefile ++++ b/Makefile +@@ -94,7 +94,7 @@ plugin_tracecmd_dir = $(libdir)/trace-cmd/plugins + python_dir ?= $(libdir)/traceevent/python + var_dir = $(HOME)/.trace-cmd/ + else +-plugin_traceevent_dir = $(libdir)/traceevent/plugins ++plugin_traceevent_dir = $(libdir)/trace-cmd/plugins + python_dir ?= $(libdir)/trace-cmd/python + PLUGIN_DIR_TRACEEVENT = -DPLUGIN_TRACEEVENT_DIR="$(plugin_traceevent_dir)" + PLUGIN_DIR_TRACECMD = -DPLUGIN_TRACECMD_DIR="$(plugin_tracecmd_dir)" +-- +2.33.0 + diff --git a/backport-Fix-broken-profile-command.patch b/backport-Fix-broken-profile-command.patch new file mode 100644 index 0000000000000000000000000000000000000000..fd4f62dc9cb7df3d05095bae8278492c2bd2878d --- /dev/null +++ b/backport-Fix-broken-profile-command.patch @@ -0,0 +1,35 @@ +From 7e12e8ba4001f51869f28770246f0ac3dbfb9999 Mon Sep 17 00:00:00 2001 +From: "Tzvetomir Stoyanov (VMware)" +Date: Fri, 14 May 2021 10:52:41 +0300 +Subject: [PATCH] trace-cmd: Fix broken profile command + +Recent changes in creating trace.dat files broke the streams, used +internaly by the trace-cmd profile command. + +Link: https://lore.kernel.org/linux-trace-devel/20210514075241.65418-1-tz.stoyanov@gmail.com + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213045 +Reported-by: Jerome Marchand +Fixes: 1762536da ("trace-cmd: Have tracecmd_read_headers() specify the state to read up to") +Signed-off-by: Tzvetomir Stoyanov (VMware) +Signed-off-by: Steven Rostedt (VMware) +--- + tracecmd/trace-stream.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tracecmd/trace-stream.c b/tracecmd/trace-stream.c +index f503bf77..b47b208c 100644 +--- a/tracecmd/trace-stream.c ++++ b/tracecmd/trace-stream.c +@@ -59,7 +59,7 @@ trace_stream_init(struct buffer_instance *instance, int cpu, int fd, int cpus, + goto fail; + } + +- if (tracecmd_read_headers(trace_input, 0) < 0) ++ if (tracecmd_read_headers(trace_input, TRACECMD_FILE_PRINTK) < 0) + goto fail_free_input; + + if (handle_init) +-- +2.33.0 + 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..a961f52b37545ebbebe84b4936b5aac8ef21584f 100644 --- a/trace-cmd.spec +++ b/trace-cmd.spec @@ -1,6 +1,6 @@ Name: trace-cmd Version: 2.9.2 -Release: 6 +Release: 9 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,9 @@ 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 +Patch0005: backport-Changing-default-install-path-of-plugins.patch +Patch0006: backport-Fix-broken-profile-command.patch BuildRequires: gcc xmlto asciidoc mlocate libxml2-devel chrpath BuildRequires: gtk2-devel glib2-devel desktop-file-utils libtraceevent-devel @@ -69,6 +72,15 @@ echo "%{_bindir}/%{name}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.co %{_mandir}/man5/* %changelog +* Mon Jan 09 2023 Bolehu - 2.9.2-9 +- Fix broken profile command + +* Sat Jan 07 2023 Bolehu - 2.9.2-8 +- Changing default install path of plugins + +* 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