- Update to version v4.11.0 * Major updates: AMD Zen1 core PMU updates AMD Zen2 core PMU support Intel Icelake core PMU support support to report if events are speculative support for Extended PEBS events on Icelake Intel Tremont core PMU support ARM Neoverse N1 core PMU support s390 event table updates Marvell TX2 core and uncore updates Intel CascadeLakeX uncore PMU support * Various other event table updates and bug fixes * Drop following patches (upstream): 0001-s390-cpumf-add-IBM-z14-ZR1-support.patch 0001-s390-cpumf-add-support-for-counter-second-version-nu.patch 0001-s390-cpumf-add-support-for-machine-type-8561.patch add-thunderx2-dmc-events-and-ccpi-events.patch moved-tx2-uncore-event-to-separate-file.patch removed-extra-fields-from-tx2_unc_data_t.patch thunderx2-uncore-support.patch update-cavium-thunderx2-with-now-public-events.patch OBS-URL: https://build.opensuse.org/request/show/871285 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libpfm?expand=0&rev=54
175 lines
5.2 KiB
RPMSpec
175 lines
5.2 KiB
RPMSpec
#
|
|
# spec file for package libpfm
|
|
#
|
|
# Copyright (c) 2021 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%global python_config CONFIG_PFMLIB_NOPYTHON=y
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%define vname libpfm4
|
|
%bcond_without python2
|
|
Name: libpfm
|
|
Version: 4.11.0
|
|
Release: 0
|
|
Summary: Library to encode performance events
|
|
License: MIT
|
|
Group: Development/Libraries/C and C++
|
|
URL: http://perfmon2.sourceforge.net/
|
|
Source: http://downloads.sourceforge.net/project/perfmon2/libpfm4/%{name}-%{version}.tar.gz
|
|
Source1: baselibs.conf
|
|
|
|
BuildRequires: %{python_module devel}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: swig >= 2.0.5
|
|
|
|
%if 0%{?python38_version_nodots}
|
|
# if python multiflavor is in place yet, use it to generate subpackages
|
|
%define python_subpackage_only 1
|
|
%python_subpackages
|
|
%else
|
|
%define python_sitearch %python3_sitearch
|
|
%define python_files() -n python3-%{**}
|
|
%endif
|
|
|
|
%description
|
|
This package provides a library that can be used to encode events into the
|
|
format required by the operating systems performance monitoring subsystem.
|
|
|
|
%package -n %{vname}
|
|
Summary: Runtime library to encode performance events for use by perf tool
|
|
Group: System/Libraries
|
|
|
|
%description -n %{vname}
|
|
This package provides a library that can be used to encode events into the
|
|
format required by the operating systems performance monitoring subsystem.
|
|
The library does not make any performance monitoring system calls, it simply
|
|
provides a method to convert an event name, expressed as a string, to an event
|
|
encoding. The user of the library may use this event encoding in a subsequent
|
|
system call.
|
|
|
|
The current libpfm4 provides support for the perf_events interface which was
|
|
introduced in Linux v2.6.31.
|
|
|
|
%package devel
|
|
Summary: Development library to encode performance events for perf_events interface
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{vname} = %{version}
|
|
|
|
%description devel
|
|
This package provides development libraries and header files used to encode performance events for perf_events interface.
|
|
|
|
%package devel-static
|
|
Summary: Static library version of libpfm
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{name}-devel = %{version}
|
|
|
|
%description devel-static
|
|
This package contains the static variant of libpfm.
|
|
|
|
%if 0%{?python_subpackage_only}
|
|
%package -n python-%{name}
|
|
Summary: Python bindings for libpfm and perf_event_open system call
|
|
Group: Development/Libraries/Python
|
|
Requires: %{vname} = %{version}
|
|
|
|
%description -n python-%{name}
|
|
This package provides python bindings for the libpfm4 package and the perf_event_open system call.
|
|
|
|
%else
|
|
%package -n python2-%{name}
|
|
Summary: Python bindings for libpfm and perf_event_open system call
|
|
Group: Development/Libraries/Python
|
|
Provides: python-%{name}
|
|
Obsoletes: python-%{name}
|
|
Requires: %{vname} = %{version}
|
|
|
|
%description -n python2-%{name}
|
|
This package provides python bindings for the libpfm4 package and the perf_event_open system call.
|
|
|
|
%package -n python3-%{name}
|
|
Summary: Python3 bindings for libpfm and perf_event_open system call
|
|
Group: Development/Libraries/Python
|
|
Requires: %{vname} = %{version}
|
|
|
|
%description -n python3-%{name}
|
|
This package provides python3 bindings for the libpfm4 package and the perf_event_open system call.
|
|
%endif
|
|
|
|
%prep
|
|
%setup -q
|
|
# disable werror
|
|
sed -i \
|
|
-e 's:-Werror::g' \
|
|
config.mk
|
|
%autopatch -p1
|
|
|
|
%build
|
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
|
export CFLAGS="%{optflags}"
|
|
make %{?_smp_mflags} %{python_config}
|
|
|
|
pushd python
|
|
%python_build
|
|
popd
|
|
|
|
%install
|
|
%global python_config %{python_config}
|
|
make \
|
|
PREFIX="%{buildroot}/%{_prefix}" \
|
|
LIBDIR="%{buildroot}/%{_libdir}" \
|
|
%{python_config} \
|
|
LDCONFIG=/bin/true \
|
|
install
|
|
install -D -p -m 0755 examples/check_events \
|
|
%{buildroot}/%{_bindir}/check_events
|
|
install -D -p -m 0755 examples/showevtinfo \
|
|
%{buildroot}/%{_bindir}/showevtinfo
|
|
install -D -p -m 0755 perf_examples/evt2raw \
|
|
%{buildroot}/%{_bindir}/evt2raw
|
|
|
|
pushd python
|
|
%python_install
|
|
popd
|
|
|
|
%post -n %{vname} -p /sbin/ldconfig
|
|
%postun -n %{vname} -p /sbin/ldconfig
|
|
|
|
%files -n %{vname}
|
|
%doc README
|
|
%{_libdir}/libpfm.so.*
|
|
|
|
%files devel
|
|
%{_includedir}/*
|
|
%{_mandir}/man3/*
|
|
%{_libdir}/lib*.so
|
|
%{_bindir}/check_events
|
|
%{_bindir}/showevtinfo
|
|
%{_bindir}/evt2raw
|
|
|
|
%files devel-static
|
|
%{_libdir}/lib*.a
|
|
|
|
%files %{python_files %{name}}
|
|
%{python_sitearch}/perfmon
|
|
%{python_sitearch}/perfmon-*-info
|
|
|
|
%if %{with python2} && ! 0%{?python_subpackage_only}
|
|
%files -n python2-%{name}
|
|
%{python2_sitearch}/*
|
|
%endif
|
|
|
|
%changelog
|