From ba2312b0b59cfdffa5d3d4d60b46182014d6d1b3 Mon Sep 17 00:00:00 2001 From: zhoukaiqi Date: Wed, 8 May 2024 16:41:15 +0800 Subject: [PATCH] replace enable and disable API in reflash_ring_buf and update libkperf v1.0.2 (cherry picked from commit 7a471fe1523515de2c00cf336ba271bc0cfbf022) --- ...-and-disable-API-in-reflash_ring_buf.patch | 62 +++++++++++++++++++ oeAware-collector.spec | 8 ++- 2 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 0003-replace-enable-and-disable-API-in-reflash_ring_buf.patch diff --git a/0003-replace-enable-and-disable-API-in-reflash_ring_buf.patch b/0003-replace-enable-and-disable-API-in-reflash_ring_buf.patch new file mode 100644 index 0000000..09247b9 --- /dev/null +++ b/0003-replace-enable-and-disable-API-in-reflash_ring_buf.patch @@ -0,0 +1,62 @@ +From f1df31f0dfcd96791430ffc4d4f85499db35f8b2 Mon Sep 17 00:00:00 2001 +From: zhoukaiqi +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 + diff --git a/oeAware-collector.spec b/oeAware-collector.spec index dcb077f..4c26600 100644 --- a/oeAware-collector.spec +++ b/oeAware-collector.spec @@ -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 - v1.0.0-5 +- replace enable and disable API in reflash_ring_buf + * Tue Apr 30 2024 zhoukaiqi - v1.0.0-4 - remove pmu.h and pcerrc.h -- Gitee