Compare commits
13 Commits
59e940ce6a
...
539b7f4e1f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
539b7f4e1f | ||
|
|
b8c6d6571a | ||
|
|
94b366d0fa | ||
|
|
12665064b5 | ||
|
|
8266ed2a90 | ||
|
|
f5563cd786 | ||
|
|
eb54c4c6d4 | ||
|
|
245c958ae6 | ||
|
|
e1c82bdd86 | ||
|
|
47497daec4 | ||
|
|
b244d6a269 | ||
|
|
7ac1846fa1 | ||
|
|
06915a4913 |
35
backport-Fix-broken-profile-command.patch
Normal file
35
backport-Fix-broken-profile-command.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 7e12e8ba4001f51869f28770246f0ac3dbfb9999 Mon Sep 17 00:00:00 2001
|
||||
From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
|
||||
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 <jmarchan@redhat.com>
|
||||
Fixes: 1762536da ("trace-cmd: Have tracecmd_read_headers() specify the state to read up to")
|
||||
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
|
||||
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
---
|
||||
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
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
From be207b060775c9841d7e3c1c240e74de63df3040 Mon Sep 17 00:00:00 2001
|
||||
From: wangmeiyang <wangmeiyang@xfusion.com>
|
||||
Date: Tue, 26 Dec 2023 11:15:29 +0800
|
||||
Subject: [PATCH 2/2] trace-cmd record: Set sleep_time to zero at end of
|
||||
recording
|
||||
|
||||
When the recording (of trace-cmd record) or streaming (of trace-cmd stream)
|
||||
is finished, set sleep_time to zero. This will cause various calls to read
|
||||
the buffer to not block, as the sleep_time is used in some instances to
|
||||
determine how long to wait if there's no data.
|
||||
|
||||
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
|
||||
---
|
||||
tracecmd/trace-record.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
|
||||
index 826d1e7..9a7cba2 100644
|
||||
--- a/tracecmd/trace-record.c
|
||||
+++ b/tracecmd/trace-record.c
|
||||
@@ -3066,6 +3066,8 @@ static void expand_event_list(void)
|
||||
|
||||
static void finish(int sig)
|
||||
{
|
||||
+ sleep_time = 0;
|
||||
+
|
||||
/* all done */
|
||||
if (recorder)
|
||||
tracecmd_stop_recording(recorder);
|
||||
--
|
||||
2.37.0.windows.1
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
From 57e830f5078314a114a34c6512629ff66b9ee590 Mon Sep 17 00:00:00 2001
|
||||
From: wangmeiyang <wangmeiyang@xfusion.com>
|
||||
Date: Tue, 26 Dec 2023 11:01:29 +0800
|
||||
Subject: [PATCH 1/2] trace-cmd stream: Set default sleep time to half a second
|
||||
|
||||
When in streaming mode, set the default to half a second instead of 1
|
||||
millisecond (which should be changed for record as well).
|
||||
|
||||
Link:https://lore.kernel.org/linux-trace-devel/20230106183930.12565-8-rostedt@goodmis.org/
|
||||
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
|
||||
---
|
||||
tracecmd/trace-record.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
|
||||
index 89a3e76..826d1e7 100644
|
||||
--- a/tracecmd/trace-record.c
|
||||
+++ b/tracecmd/trace-record.c
|
||||
@@ -6533,6 +6533,9 @@ void trace_stream(int argc, char **argv)
|
||||
{
|
||||
struct common_record_context ctx;
|
||||
|
||||
+ /* Default sleep time is half a second for streaming */
|
||||
+ sleep_time = 500000;
|
||||
+
|
||||
parse_record_options(argc, argv, CMD_stream, &ctx);
|
||||
record_trace(argc, argv, &ctx);
|
||||
exit(0);
|
||||
--
|
||||
2.37.0.windows.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: trace-cmd
|
||||
Version: 2.9.2
|
||||
Release: 8
|
||||
Release: 12
|
||||
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
|
||||
@ -12,6 +12,9 @@ Patch0002: backport-trace-cmd-library-Fix-version-string-memory-leak.p
|
||||
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
|
||||
Patch0007: backport-trace-cmd-stream-Set-default-sleep-time-to-half-a-se.patch
|
||||
Patch0008: backport-trace-cmd-record-Set-sleep_time-to-zero-at-end-of-re.patch
|
||||
|
||||
BuildRequires: gcc xmlto asciidoc mlocate libxml2-devel chrpath
|
||||
BuildRequires: gtk2-devel glib2-devel desktop-file-utils libtraceevent-devel
|
||||
@ -71,6 +74,18 @@ echo "%{_bindir}/%{name}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.co
|
||||
%{_mandir}/man5/*
|
||||
|
||||
%changelog
|
||||
* Tue Dec 26 2023 meiyang666 <wangmeiyang@xfusion.com> - 2.9.2-12
|
||||
- Fix spec file
|
||||
|
||||
* Tue Dec 26 2023 meiyang666 <wangmeiyang@xfusion.com> - 2.9.2-11
|
||||
- trace-cmd record: Set sleep_time to zero at end of recording
|
||||
|
||||
* Tue Dec 26 2023 meiyang666 <wangmeiyang@xfusion.com> - 2.9.2-10
|
||||
- trace-cmd stream: Set default sleep time to half a second
|
||||
|
||||
* Mon Jan 09 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-9
|
||||
- Fix broken profile command
|
||||
|
||||
* Sat Jan 07 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-8
|
||||
- Changing default install path of plugins
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user