114 Star 0 Fork 16

src-openEuler/trace-cmd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Remove-unneeded-multiply-in-events-timesta.patch 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
starlet_dx 提交于 2024-04-01 16:38 . Sync code
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/trace-cmd.git
git@gitee.com:src-openeuler/trace-cmd.git
src-openeuler
trace-cmd
trace-cmd
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385