代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dim 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 3c7a97428e8605ddcd12f7928f590d6f89d664f8 Mon Sep 17 00:00:00 2001
From: Huaxin Lu <luhuaxin1@huawei.com>
Date: Sun, 5 May 2024 11:43:10 +0800
Subject: [PATCH 06/28] Try to add the absolute path of process in static
baseline
Signed-off-by: Huaxin Lu <luhuaxin1@huawei.com>
---
.../static_baseline/dim_core_static_baseline.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/core/static_baseline/dim_core_static_baseline.c b/src/core/static_baseline/dim_core_static_baseline.c
index e33c67c..ff05690 100644
--- a/src/core/static_baseline/dim_core_static_baseline.c
+++ b/src/core/static_baseline/dim_core_static_baseline.c
@@ -46,7 +46,23 @@ static int baseline_check_add(const char *name, int type,
struct dim_digest *digest,
struct dim_measure *m)
{
- return dim_measure_static_baseline_add(m, name, type, digest);
+ int ret = 0;
+ const char *real_path = NULL;
+
+ if (type == DIM_BASELINE_KERNEL)
+ return dim_measure_static_baseline_add(m, name, type, digest);
+
+ /* for process, try to add the absolute path */
+ ret = dim_get_absolute_path(name, &real_path);
+ if (ret < 0) {
+ dim_warn("failed to get absolute path of %s in static baeline: %d\n",
+ name, ret);
+ return dim_measure_static_baseline_add(m, name, type, digest);
+ }
+
+ ret = dim_measure_static_baseline_add(m, real_path, type, digest);
+ dim_kfree(real_path);
+ return ret;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。