Remove unneeded multiply in events timestamp reading
Signed-off-by: Bolehu <heyaohua@xfusion.com>
This commit is contained in:
parent
d35446d779
commit
a3eb004594
38
backport-Remove-unneeded-multiply-in-events-timesta.patch
Normal file
38
backport-Remove-unneeded-multiply-in-events-timesta.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 43fa39ef1717e98ffe71ab0b53fefdfe1f02be3d Mon Sep 17 00:00:00 2001
|
||||
From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
|
||||
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) <tz.stoyanov@gmail.com>
|
||||
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
---
|
||||
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
|
||||
|
||||
@ -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 <heyaohua@xfusion.com> - 2.9.2-7
|
||||
- Remove unneeded multiply in events timestamp reading
|
||||
|
||||
* Fri Jan 06 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-6
|
||||
- trace-cmd library: Fixed a memory leak on input handler close
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user