In the Ceph scenario, enabling tcmalloc huge pages can reduce the TLB miss rate and improve performance. However, tcmalloc does not support huge page release. Therefore, release logic needs to be added. In this way, when the tcmalloc huge page is used, the memory can be released from the OS, preventing memory overuse. The libtcmalloc_2m.so file is added to tcmalloc to support hugetlb and services that require 2 MB tcmalloc. The native tcmalloc.so file is not affected. Signed-off-by: liubo <liubo254@huawei.com>
194 lines
5.5 KiB
RPMSpec
194 lines
5.5 KiB
RPMSpec
Name: gperftools
|
|
Version: 2.10
|
|
Release: 3
|
|
Summary: high-performance malloc and performance analysis tools
|
|
|
|
License: BSD-3-Clause
|
|
URL: https://github.com/gperftools/gperftools
|
|
Source0: https://github.com/gperftools/gperftools/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
|
|
Patch1: gperftools-generic-dynamic-tls.patch
|
|
Patch2: fix-loongarch64-build-failed.patch
|
|
|
|
Patch9000: issue-1122-fix-bus-error-on-aarch64.patch
|
|
Patch9001: skip-arm-in-stacktrace_unittest.patch
|
|
Patch9002: skip-heapchecker-in-arm-arch.patch
|
|
Patch9003: avoid-exceed-int-range.patch
|
|
Patch9004: skip-tcm_asserts_unittest.patch
|
|
Patch9005: Continue-to-release-span-until-the-end-of-one-round.patch
|
|
Patch9006: gperftools-2.10-sw.patch
|
|
Patch9007: add-libtcmalloc_2m.so-in-gperftools-libs-rpm-package.patch
|
|
|
|
|
|
BuildRequires: autoconf automake gcc-c++
|
|
BuildRequires: libtool libunwind-devel perl-generators
|
|
Requires: %{name}-libs = %{version}-%{release}
|
|
|
|
ExcludeArch: s390
|
|
|
|
%description
|
|
gperftools is a collection of a high-performance multi-threaded \
|
|
malloc() implementation, plus some pretty nifty performance analysis \
|
|
tools.
|
|
|
|
%package libs
|
|
Summary: Libraries for CPU profiler and tcmalloc
|
|
Provides: google-perftools-libs = %{version}-%{release}
|
|
Obsoletes: google-perftools-libs < 2.0
|
|
|
|
%description libs
|
|
This package contains libraries with CPU or heap profiling and thread-caching
|
|
malloc().
|
|
|
|
%package devel
|
|
Summary: Development header files
|
|
Requires: pkg-config
|
|
Requires: %{name}-libs = %{version}-%{release}
|
|
Provides: google-perftools-devel = %{version}-%{release}
|
|
Provides: pkg-config(gperftools-devel) = %{version}-%{release}
|
|
Obsoletes: google-perftools-devel < 2.0
|
|
|
|
%description devel
|
|
This package contains Development header files with CPU or heap profiling and
|
|
thread-caching malloc() which provides by google and gperftools.
|
|
|
|
%package -n pprof
|
|
Summary: Analyzes CPU and heap profiles tools
|
|
Requires: gv graphviz perl
|
|
Requires: %{name}-devel = %{version}-%{release}
|
|
BuildArch: noarch
|
|
Provides: pprof = %{version}-%{release}
|
|
Provides: google-perftools = %{version}-%{release}
|
|
Obsoletes: google-perftools < 2.0
|
|
|
|
%description -n pprof
|
|
pprof is an facility that analyzes CPU and heap profiles.
|
|
|
|
%prep
|
|
%autosetup -n %{name}-%{version} -p1
|
|
|
|
%build
|
|
autoreconf -vif
|
|
|
|
CFLAGS=`echo $RPM_OPT_FLAGS -fno-strict-aliasing -Wno-unused-local-typedefs -DTCMALLOC_LARGE_PAGES | sed -e 's|-fexceptions||g'`
|
|
CXXFLAGS=`echo $RPM_OPT_FLAGS -fno-strict-aliasing -Wno-unused-local-typedefs -DTCMALLOC_LARGE_PAGES | sed -e 's|-fexceptions||g'`
|
|
|
|
%configure \
|
|
%ifarch s390x aarch64
|
|
--disable-general-dynamic-tls \
|
|
%endif
|
|
%ifarch sw_64
|
|
--disable-cpu-profiler \
|
|
%endif
|
|
--disable-dynamic-sized-delete-support \
|
|
|
|
%disable_rpath
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
%check
|
|
LD_LIBRARY_PATH=./.libs make check
|
|
|
|
%install
|
|
%make_install
|
|
|
|
%ldconfig_scriptlets libs
|
|
|
|
%files
|
|
#nothing to do
|
|
|
|
%files libs
|
|
%ifnarch sw_64
|
|
%{_libdir}/libprofiler.so.*
|
|
%endif
|
|
%{_libdir}/libtcmalloc*.so.*
|
|
|
|
%files devel
|
|
%{_includedir}/google/*.h
|
|
%{_includedir}/gperftools/*.h
|
|
%ifnarch sw_64
|
|
%{_libdir}/libprofiler.so
|
|
%{_libdir}/libprofiler.*a
|
|
%endif
|
|
%{_libdir}/libtcmalloc*.so
|
|
%{_libdir}/pkgconfig/*.pc
|
|
%{_docdir}/%{name}/*
|
|
%{_libdir}/libtcmalloc*.*a
|
|
|
|
%files -n pprof
|
|
%{_bindir}/*
|
|
%{_mandir}/man1/*.1.gz
|
|
|
|
%changelog
|
|
* Fri Apr 12 2024 liubo <liubo254@huawei.com> - 2.10-3
|
|
- add libtcmalloc_2m.so in gperftools-libs rpm package
|
|
|
|
* Mon May 15 2023 yangchenguang <yangchenguang@kylinsec.com.cn> - 2.10-2
|
|
- fix loongarch64 build error and sw_64 build error
|
|
|
|
* Thu Nov 10 2022 Liu Zixian <liuzixian4@huawei.com> - 2.10-1
|
|
- Update to 2.10
|
|
|
|
* Thu Oct 20 2022 wuzx<wuzx1226@qq.com> - 2.9.1-6
|
|
- add sw64 patch
|
|
|
|
* Fri May 20 2022 loong_C <loong_c@yeah.net> - 2.9.1-5
|
|
- fix spec changelog date
|
|
|
|
* Mon Feb 28 2022 liusirui <liusirui@huawei.com> - 2.9.1-4
|
|
- remove the dependency of the main package and pprof
|
|
|
|
* Tue Jan 11 2022 QingqingLi <liqingqing3@huawei.com> - 2.9.1-3
|
|
- continue to release span until the end of one round
|
|
- use %{?_smp_mflags} to build
|
|
|
|
* Mon Jan 10 2022 zhangyiru <zhangyiru3@huawei.com> - 2.9.1-2
|
|
- skip stacktrace_unittest & tcm_asserts_unittest
|
|
|
|
* Sun Dec 5 2021 zhouwenpei <zhouwenpei1@huawei.com> - 2.9.1-1
|
|
- update to 2.9.1
|
|
|
|
* Tue Nov 9 2021 zhangyiru <zhangyiru3@huawei.com> - 2.8.1-4
|
|
- avoid exceed int range when use heapchecker
|
|
|
|
* Wed Oct 20 2021 zhangyiru <zhangyiru3@huawei.com> - 2.8.1-3
|
|
- enable make check && skip four arm testcases.
|
|
the reason is that arm do not have fully functional heap checker and
|
|
the calling of unw_step in arm stacktrace_unittest is incorrect, but the function is not affected
|
|
|
|
* Thu Jul 22 2021 zhangyiru <zhangyiru3@huawei.com> - 2.8.1-2
|
|
- remove invalid gdb build dependency
|
|
|
|
* Sat Jan 30 2021 xinghe <xinghe1@huawei.com> - 2.8.1-1
|
|
- update to 2.8.1
|
|
|
|
* Tue Sep 22 2020 liuzixian <liuzixian4@huawei.com> - 2.8-2
|
|
- Type: bufgix
|
|
- Reason: add patch gperftools-generic-dynamic-tls.patch to avoid issue #I1VAEU which is probably caused by compiler bugs.
|
|
|
|
* Thu Jul 23 2020 jinzhimin <jinzhimin2@huawei.com> - 2.8-1
|
|
- update to 2.8
|
|
|
|
* Thu Mar 19 2020 yuxiangyang <yuxiangyang4@huawei.com> - 2.7-7
|
|
- fix build src.rpm error
|
|
|
|
* Fri Jan 10 2020 wuxu_wu <wuxu.wu@huawei.com> - 2.7-6
|
|
- delete useless patch
|
|
|
|
* Thu Aug 29 2019 luochunsheng <luochunsheng@huawei.com> - 2.7-5
|
|
- fix spelling errors
|
|
|
|
* Mon Jun 17 2019 Zhipeng Xie <xiezhipeng1@huawei.com> - 2.7-4
|
|
- Type:bugfix
|
|
- ID:NA
|
|
- SUG: NA
|
|
- DESC: issue-1122: fix bus error on aarch64
|
|
|
|
* Mon Apr 15 2019 lvying <lvying6@huawei.com> - 2.7-3
|
|
- Type:enhancement
|
|
- ID:NA
|
|
- SUG: NA
|
|
- DESC: peripheral package quality reinforcement: backport bugfix patches from community
|
|
|
|
* Tue Mar 5 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.7-2
|
|
- Package init
|