2024-04-18 11:47:22 +08:00
|
|
|
Name: oeAware-collector
|
2024-05-31 16:57:58 +08:00
|
|
|
Version: v1.0.2
|
2024-08-06 15:13:48 +08:00
|
|
|
Release: 10
|
2024-04-18 11:47:22 +08:00
|
|
|
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
|
2024-06-20 10:38:06 +08:00
|
|
|
Patch1: 0001-add-netif_rx-counting-pmu-instance.patch
|
2024-07-05 16:52:53 +08:00
|
|
|
Patch2: 0002-reduce-thread-collector-load.patch
|
|
|
|
|
Patch3: 0003-fix-uninitialized-PmuAttr-attr.patch
|
2024-07-15 14:42:48 +08:00
|
|
|
Patch4: 0004-fix-out-of-bounds-array.patch
|
2024-08-06 15:13:48 +08:00
|
|
|
Patch5: 0005-adapt-for-4.19-kernel.patch
|
2024-04-18 11:47:22 +08:00
|
|
|
|
|
|
|
|
%global libkperf_name libkperf
|
2024-06-27 11:00:56 +08:00
|
|
|
%global libkperf_tagver v1.0.4
|
2024-04-18 11:47:22 +08:00
|
|
|
%global libkperf_source https://gitee.com/openeuler/libkperf.git
|
|
|
|
|
|
|
|
|
|
BuildRequires: cmake gcc-c++
|
|
|
|
|
BuildRequires: numactl-devel
|
|
|
|
|
BuildRequires: git
|
|
|
|
|
BuildRequires: libboundscheck
|
2024-07-10 15:07:08 +08:00
|
|
|
Requires: libboundscheck
|
2024-04-18 11:47:22 +08:00
|
|
|
Provides: %{name}
|
|
|
|
|
|
|
|
|
|
ExclusiveArch: aarch64 x86_64
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
%{name} provides low-overhead metrics collection capabilities, including microarchitecture, system, and kernel information.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -p1 -n %{name}-%{version}
|
|
|
|
|
%ifarch aarch64
|
|
|
|
|
cd ./pmu/
|
|
|
|
|
git clone --recurse-submodules %{libkperf_source}
|
|
|
|
|
cd %{libkperf_name}
|
|
|
|
|
git checkout %{libkperf_tagver}
|
|
|
|
|
cd ..
|
|
|
|
|
mv %{libkperf_name}/ %{libkperf_name}-%{libkperf_tagver}/
|
|
|
|
|
cd ..
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# build libkperf.so
|
|
|
|
|
%ifarch aarch64
|
|
|
|
|
cd %{_builddir}/%{name}-%{version}/pmu/
|
|
|
|
|
mkdir -p ./3rdlib/
|
|
|
|
|
sh ./%{libkperf_name}-%{libkperf_tagver}/build.sh
|
|
|
|
|
cp -r %{libkperf_name}-%{libkperf_tagver}/output/* ./3rdlib/
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# build libpmu.so
|
|
|
|
|
%ifarch aarch64
|
|
|
|
|
cd %{_builddir}/%{name}-%{version}/pmu/
|
|
|
|
|
mkdir build
|
|
|
|
|
cd build
|
|
|
|
|
cmake .. -DLIB_KPERF_LIBPATH=%{_builddir}/%{name}-%{version}/pmu/3rdlib/bin/ \
|
|
|
|
|
-DLIB_KPERF_INCPATH=%{_builddir}/%{name}-%{version}/pmu/3rdlib/include/ \
|
2024-07-16 16:19:34 +08:00
|
|
|
-DCMAKE_SKIP_RPATH=TRUE -DWITH_DEBUG=TRUE
|
2024-04-18 11:47:22 +08:00
|
|
|
make
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# build libthread_collector.so
|
|
|
|
|
cd %{_builddir}/%{name}-%{version}/thread_collector/
|
|
|
|
|
mkdir build
|
|
|
|
|
cd build
|
2024-04-18 16:41:47 +08:00
|
|
|
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
2024-04-18 11:47:22 +08:00
|
|
|
make
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
2024-05-31 16:57:58 +08:00
|
|
|
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/oeAware-plugin/
|
2024-04-18 11:47:22 +08:00
|
|
|
%ifarch aarch64
|
2024-04-18 16:41:47 +08:00
|
|
|
install -b -m740 ./pmu/3rdlib/bin/*.so ${RPM_BUILD_ROOT}%{_libdir}
|
2024-05-31 16:57:58 +08:00
|
|
|
install -b -m740 ./pmu/build/libpmu.so ${RPM_BUILD_ROOT}%{_libdir}/oeAware-plugin/
|
2024-04-18 11:47:22 +08:00
|
|
|
%endif
|
2024-05-31 16:57:58 +08:00
|
|
|
install -b -m740 ./thread_collector/build/libthread_collector.so ${RPM_BUILD_ROOT}%{_libdir}/oeAware-plugin/
|
2024-04-18 11:47:22 +08:00
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr (-, root, root)
|
|
|
|
|
%ifarch aarch64
|
|
|
|
|
%attr(0440, root, root) %{_libdir}/libkperf.so
|
|
|
|
|
%attr(0440, root, root) %{_libdir}/libsym.so
|
2024-05-31 16:57:58 +08:00
|
|
|
%attr(0440, root, root) %{_libdir}/oeAware-plugin/libpmu.so
|
2024-04-18 11:47:22 +08:00
|
|
|
%endif
|
2024-05-31 16:57:58 +08:00
|
|
|
%attr(0440, root, root) %{_libdir}/oeAware-plugin/libthread_collector.so
|
2024-04-18 11:47:22 +08:00
|
|
|
|
|
|
|
|
%changelog
|
2024-08-06 15:13:48 +08:00
|
|
|
* Tue Aug 6 2024 liuchanggeng <liuchanggeng@huawei.com> - v1.0.2-10
|
|
|
|
|
- adapt for 4.19 kernel
|
|
|
|
|
|
2024-07-16 16:19:34 +08:00
|
|
|
* Tue Jul 16 2024 fly_1997 <flylove7@outlook.com> - v1.0.2-9
|
|
|
|
|
- fix pmu cmake build option error
|
|
|
|
|
|
2024-07-10 15:07:08 +08:00
|
|
|
* Tue Jul 16 2024 Zhao Mengmeng <zhaomengmeng@kylinos.cn> - v1.0.2-8
|
|
|
|
|
- explicit add libboundscheck as Requires
|
|
|
|
|
|
2024-07-15 14:42:48 +08:00
|
|
|
* Mon Jul 15 2024 fly_1997 <flylove7@outlook.com> - v1.0.2-7
|
|
|
|
|
- fix out of bounds array
|
|
|
|
|
|
2024-07-05 16:52:53 +08:00
|
|
|
* Fri Jul 5 2024 zhoukaiqi <zhoukaiqi@huawei.com> - v1.0.2-6
|
|
|
|
|
- fix uninitialized PmuAttr attr
|
|
|
|
|
|
2024-07-02 14:03:24 +08:00
|
|
|
* Tue Jul 2 2024 fly_1997 <flylove7@outlook.com> - v1.0.2-5
|
|
|
|
|
- reduce thread collector load
|
|
|
|
|
|
2024-06-27 11:00:56 +08:00
|
|
|
* Thu Jun 27 2024 zhoukaiqi <zhoukaiqi@huawei.com> - v1.0.2-4
|
|
|
|
|
- update libkperf version to v1.0.4
|
|
|
|
|
|
2024-06-20 10:38:06 +08:00
|
|
|
* Thu Jun 20 2024 liuchanggeng <liuchanggeng@huawei.com> - v1.0.2-3
|
|
|
|
|
- add netif_rx counting pmu instance
|
|
|
|
|
|
2024-06-05 11:09:18 +08:00
|
|
|
* Wed Jun 5 2024 zhoukaiqi <zhoukaiqi@huawei.com> - v1.0.2-2
|
|
|
|
|
- update libkperf version to v1.0.3
|
|
|
|
|
|
2024-05-31 16:57:58 +08:00
|
|
|
* Fri May 31 2024 zhoukaiqi <zhoukaiqi@huawei.com> - v1.0.2-1
|
|
|
|
|
- refactor interface and fix some bugs
|
|
|
|
|
|
2024-05-15 09:27:46 +08:00
|
|
|
* Wed May 15 2024 zhoukaiqi <zhoukaiqi@huawei.com> - v1.0.1-2
|
|
|
|
|
- fix compile warnings
|
|
|
|
|
|
2024-05-11 10:23:01 +08:00
|
|
|
* Sat May 11 2024 fly_1997 <flylove7@outlook.com> -v1.0.1-1
|
|
|
|
|
- update version to v1.0.1
|
|
|
|
|
|
2024-05-08 16:41:15 +08:00
|
|
|
* Wed May 8 2024 zhoukaiqi <zhoukaiqi@huawei.com> - v1.0.0-5
|
|
|
|
|
- replace enable and disable API in reflash_ring_buf
|
|
|
|
|
|
2024-04-30 17:22:51 +08:00
|
|
|
* Tue Apr 30 2024 zhoukaiqi <zhoukaiqi@huawei.com> - v1.0.0-4
|
|
|
|
|
- remove pmu.h and pcerrc.h
|
|
|
|
|
|
|
|
|
|
* Mon Apr 29 2024 zhoukaiqi <zhoukaiqi@huawei.com> - v1.0.0-3
|
2024-04-29 17:36:57 +08:00
|
|
|
- fix log while not supporting pmu uncore
|
|
|
|
|
|
2024-04-30 17:22:51 +08:00
|
|
|
* Thu Apr 18 2024 liuchanggeng <liuchanggeng@huawei.com> - v1.0.0-2
|
2024-04-18 16:41:47 +08:00
|
|
|
- add debug package
|
|
|
|
|
|
2024-04-30 17:22:51 +08:00
|
|
|
* Wed Apr 17 2024 liuchanggeng <liuchanggeng@huawei.com> - v1.0.0-1
|
2024-04-18 11:47:22 +08:00
|
|
|
- Package init
|