!18 [sync] PR-17: replace enable and disable API in reflash_ring_buf and update libkperf v1.0.2

From: @openeuler-sync-bot 
Reviewed-by: @ksana123 
Signed-off-by: @ksana123
This commit is contained in:
openeuler-ci-bot 2024-05-08 10:50:01 +00:00 committed by Gitee
commit 72432d1196
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 68 additions and 2 deletions

View File

@ -0,0 +1,62 @@
From f1df31f0dfcd96791430ffc4d4f85499db35f8b2 Mon Sep 17 00:00:00 2001
From: zhoukaiqi <zhoukaiqi@huawei.com>
Date: Wed, 8 May 2024 16:02:55 +0800
Subject: [PATCH] replace enable and disable API in reflash_ring_buf
---
pmu/plugin/plugin_counting.c | 4 ++--
pmu/plugin/plugin_sampling.c | 4 ++--
pmu/plugin/plugin_uncore.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/pmu/plugin/plugin_counting.c b/pmu/plugin/plugin_counting.c
index 363b892..b18b8be 100644
--- a/pmu/plugin/plugin_counting.c
+++ b/pmu/plugin/plugin_counting.c
@@ -99,9 +99,9 @@ void counting_reflash_ring_buf()
return;
}
- counting_disable();
+ PmuDisable(counting_pd);
len = PmuRead(counting_pd, &counting_data);
- counting_enable();
+ PmuEnable(counting_pd);
fill_buf(data_header, counting_data, len);
}
diff --git a/pmu/plugin/plugin_sampling.c b/pmu/plugin/plugin_sampling.c
index 7adc21c..132de07 100644
--- a/pmu/plugin/plugin_sampling.c
+++ b/pmu/plugin/plugin_sampling.c
@@ -101,9 +101,9 @@ void sampling_reflash_ring_buf()
return;
}
- sampling_disable();
+ PmuDisable(sampling_pd);
len = PmuRead(sampling_pd, &sampling_data);
- sampling_enable();
+ PmuEnable(sampling_pd);
fill_buf(data_header, sampling_data, len);
}
diff --git a/pmu/plugin/plugin_uncore.c b/pmu/plugin/plugin_uncore.c
index 2042d16..070f1a7 100644
--- a/pmu/plugin/plugin_uncore.c
+++ b/pmu/plugin/plugin_uncore.c
@@ -124,9 +124,9 @@ void uncore_reflash_ring_buf()
return;
}
- uncore_disable();
+ PmuDisable(uncore_pd);
len = PmuRead(uncore_pd, &uncore_data);
- uncore_enable();
+ PmuEnable(uncore_pd);
fill_buf(data_header, uncore_data, len);
}
--
2.27.0

View File

@ -1,15 +1,16 @@
Name: oeAware-collector
Version: v1.0.0
Release: 4
Release: 5
Summary: %{name} provides low-overhead metrics collection capabilities, including microarchitecture, system, and kernel information.
License: MulanPSL2
URL: https://gitee.com/openeuler/%{name}
Source0: %{name}-%{version}.tar.gz
Patch1: 0001-fix-log-while-not-supporting-pmu-uncore.patch
Patch2: 0002-remove-pmu.h-and-pcerrc.h.patch
Patch3: 0003-replace-enable-and-disable-API-in-reflash_ring_buf.patch
%global libkperf_name libkperf
%global libkperf_tagver v1.0.1
%global libkperf_tagver v1.0.2
%global libkperf_source https://gitee.com/openeuler/libkperf.git
BuildRequires: cmake gcc-c++
@ -81,6 +82,9 @@ install -b -m740 ./thread_collector/build/libthread_collector.so ${RPM_BUIL
%attr(0440, root, root) %{_libdir}/oeAware-plugin/collector/*.so
%changelog
* Wed May 8 2024 zhoukaiqi <zhoukaiqi@huawei.com> - v1.0.0-5
- replace enable and disable API in reflash_ring_buf
* Tue Apr 30 2024 zhoukaiqi <zhoukaiqi@huawei.com> - v1.0.0-4
- remove pmu.h and pcerrc.h