import CS libpfm-4.13.0-4.el9

This commit is contained in:
eabdullin 2023-09-21 19:11:13 +00:00
parent 35d7fa75ee
commit db3d3d017a
5 changed files with 68 additions and 4 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/libpfm-4.11.0.tar.gz
SOURCES/libpfm-4.13.0.tar.gz

View File

@ -1 +1 @@
112bced9a67d565ff0ce6c2bb90452516d1183e5 SOURCES/libpfm-4.11.0.tar.gz
bcb52090f02bc7bcb5ac066494cd55bbd5084e65 SOURCES/libpfm-4.13.0.tar.gz

View File

@ -0,0 +1,19 @@
commit 75d8bb06f6ea0d7a8edf8e080c7ea6d434d598ff
Author: William Cohen <wcohen@redhat.com>
Date: Fri Apr 14 16:07:07 2023 -0400
Make sure that p is set to a known value before using.
diff --git a/lib/pfmlib_perf_event_pmu.c b/lib/pfmlib_perf_event_pmu.c
index 637c5b1..8f7d7d1 100644
--- a/lib/pfmlib_perf_event_pmu.c
+++ b/lib/pfmlib_perf_event_pmu.c
@@ -361,7 +361,7 @@ gen_tracepoint_table(void)
{
DIR *dir1, *dir2;
struct dirent *d1, *d2;
- perf_event_t *p;
+ perf_event_t *p = NULL;
perf_umask_t *um;
char d2path[MAXPATHLEN];
char idpath[MAXPATHLEN];

29
SOURCES/libpfm-zen4.patch Normal file
View File

@ -0,0 +1,29 @@
commit 1befa3d200cc17d5a278fcb2f597c4876c58f949
Author: Stephane Eranian <eranian@gmail.com>
Date: Tue Apr 25 00:35:41 2023 -0700
fix AMD Zen3/Zen4 detection
To cover more models of Zen4.
Signed-off-by: Stephane Eranian <eranian@gmail.com>
diff --git a/lib/pfmlib_amd64.c b/lib/pfmlib_amd64.c
index e51a43d..0c6702d 100644
--- a/lib/pfmlib_amd64.c
+++ b/lib/pfmlib_amd64.c
@@ -181,10 +181,10 @@ amd64_get_revision(pfm_amd64_config_t *cfg)
} else if (cfg->family == 22) { /* family 16h */
rev = PFM_PMU_AMD64_FAM16H;
} else if (cfg->family == 25) { /* family 19h */
- if (cfg->model <= 0x0f || (cfg->model >= 0x20 && cfg->model <= 0x5f)) {
- rev = PFM_PMU_AMD64_FAM19H_ZEN3;
- } else if (cfg->model == 17) {
- rev = PFM_PMU_AMD64_FAM19H_ZEN4;
+ if (cfg->model >= 0x60 || (cfg->model >= 0x10 && cfg->model <= 0x1f)) {
+ rev = PFM_PMU_AMD64_FAM19H_ZEN4;
+ } else {
+ rev = PFM_PMU_AMD64_FAM19H_ZEN3;
}
}

View File

@ -11,8 +11,8 @@
%endif
Name: libpfm
Version: 4.11.0
Release: 6%{?dist}
Version: 4.13.0
Release: 4%{?dist}
Summary: Library to encode performance events for use by perf tool
@ -20,6 +20,8 @@ License: MIT
URL: http://perfmon2.sourceforge.net/
Source0: http://sourceforge.net/projects/perfmon2/files/libpfm4/%{name}-%{version}.tar.gz
Patch2: libpfm-python3-setup.patch
Patch3: libpfm-initp.patch
Patch4: libpfm-zen4.patch
BuildRequires: make
BuildRequires: gcc
@ -71,6 +73,8 @@ Python bindings for libpfm4 and perf_event_open system call.
%prep
%setup -q
%patch2 -p1 -b .python3
%patch3 -p1 -b .test
%patch4 -p1 -b .zen4
%build
%if %{with python}
@ -124,6 +128,18 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a
%endif
%changelog
* Mon Jun 12 2023 William cohen <wcohen@redhat.com> - 4.13.0-4
- Identify AMD Bergamo processors.
* Wed May 3 2023 William cohen <wcohen@redhat.com> - 4.13.0-3
- Rebuild for rhbz #2186927.
* Wed May 3 2023 William cohen <wcohen@redhat.com> - 4.13.0-2
- Rebuild for rhbz #2186927.
* Fri Apr 14 2023 William cohen <wcohen@redhat.com> - 4.13.0-1
- Rebase to libpf-4.13.0 (rhbz #2185652)
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 4.11.0-6
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688