diff --git a/trace-cmd-Fix-broken-profile-command.patch b/trace-cmd-Fix-broken-profile-command.patch new file mode 100644 index 0000000..97ea91c --- /dev/null +++ b/trace-cmd-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 f503bf7..b47b208 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.31.1 + diff --git a/trace-cmd.spec b/trace-cmd.spec index 91220bf..8fecc7c 100644 --- a/trace-cmd.spec +++ b/trace-cmd.spec @@ -6,7 +6,7 @@ Name: trace-cmd Version: %{srcversion} -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 and LGPLv2 Summary: A user interface to Ftrace Requires: libtracecmd @@ -19,6 +19,8 @@ URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary # cd trace-cmd # git archive --prefix=trace-cmd-%%{version}/ -o trace-cmd-v%%{version}.tar.gz %%{git_commit} Source0: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-v%{srcversion}.tar.gz +Patch0: trace-cmd-Fix-broken-profile-command.patch + BuildRequires: make BuildRequires: gcc BuildRequires: xmlto @@ -64,7 +66,7 @@ Requires: libtracecmd%{_isa} = %{version}-%{release} Development files of the libtracecmd library %prep -%autosetup -n %{name}-v%{srcversion} +%autosetup -p1 -n %{name}-v%{srcversion} %build # MANPAGE_DOCBOOK_XSL define is hack to avoid using locate @@ -111,6 +113,9 @@ mkdir -p %{buildroot}/%{_sysconfdir} %{_includedir}/trace-cmd %changelog +* Thu Nov 11 2021 Jerome Marchand - 2.9.2-6 +- Fix trace-cmd profile + * Tue Aug 10 2021 Mohan Boddu - 2.9.2-5 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688